# How to get errors/exceptions while developing custom node?

**URL:** <https://discourse.nodered.org/t/how-to-get-errors-exceptions-while-developing-custom-node/23830>\
**Category:** Developing Nodes\
**Tags:** debugging\
**Created:** [29 March 2020 13:28 UTC](https://discourse.nodered.org/t/how-to-get-errors-exceptions-while-developing-custom-node/23830 "2020-03-29T13:28:43Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [29 March 2020 14:59 UTC](https://discourse.nodered.org/t/how-to-get-errors-exceptions-while-developing-custom-node/23830/3 "2020-03-29T14:59:32Z")

</div>

> [@tb19-nr](#):
>
> No line information, no file name, just a warning, but at least "something".

Yes, I know the feeling...

I have developed my own workaround. But it is rather _ **unorthodox** _ and I have no clue whether it works on all platforms!!!! However it works fine on my Raspberry.

After I install a new version of Node-RED, I always add an extra console log line to the Node-RED code, where the nodes are being loaded and parsed (`/usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js`), in the `loadNodeSet` function:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/e/3e5bdf1429c05a840eeb4af47b7047b6b75a3bb5.png)

Now suppose I have an error in one of my custom nodes:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/d/cdbb0ed2b70e9728bfcda82dee7f187eade38f80.png)

Then at startup I see at least where it is going wrong:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/5/d5811739810f3d13f0427ada0e57ddbadfea2070.png)

Not a very elegant solution, but it has saved me lots of time guessing about what is going wrong ...  
P.S. I also think it doesn't report all errors, but I'm not sure at the moment.

---

_[View the full topic](https://discourse.nodered.org/t/how-to-get-errors-exceptions-while-developing-custom-node/23830)._
