# Debug in Node-RED Blockly node

**URL:** <https://discourse.nodered.org/t/debug-in-node-red-blockly-node/5802>\
**Category:** General\
**Created:** [14 December 2018 11:38 UTC](https://discourse.nodered.org/t/debug-in-node-red-blockly-node/5802 "2018-12-14T11:38:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Poul89](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@Poul89](https://discourse.nodered.org/u/Poul89)\
**Post date:** [14 December 2018 11:38 UTC](https://discourse.nodered.org/t/debug-in-node-red-blockly-node/5802/1 "2018-12-14T11:38:44Z")

</div>

Hi

I'm new here and would like to know how to debug in blockly

There are possibilities like debugging in Eclipse or Visual Studio?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [14 December 2018 11:43 UTC](https://discourse.nodered.org/t/debug-in-node-red-blockly-node/5802/2 "2018-12-14T11:43:21Z")

</div>

If you mean within one of the node-red-contrib nodes  
I would suggest that you edit your posts title to include the name of the node you are using.

---

<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:** [27 December 2018 17:46 UTC](https://discourse.nodered.org/t/debug-in-node-red-blockly-node/5802/3 "2018-12-27T17:46:45Z")

</div>

Hi Rico (@Poul89),

For some reason I have not seen your question.  
Are you referring to [node-red-contrib-blockly](https://github.com/bartbutenaers/node-red-contrib-blockly) perhaps?

If so, the answer is ' **no**'. The node-red-contrib-blockly node generates Javascript code, which will be evaluated by NodeJs (_similar to the Function node_) in a sandbox as 1 large piece of text. So there is no way to debug it as separate statements...

Other applications build on top of the Blockly framework however [can](https://developers.google.com/blockly/guides/app-integration/running-javascript) be debugged, since their generated code will run in a sandboxed [JavaScript interpreter](https://github.com/NeilFraser/JS-Interpreter). But that is not the way Node-RED is designed at the moment ...

Bart

---

<div class="post-metadata">

**Author:** ![Poul89](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@Poul89](https://discourse.nodered.org/u/Poul89)\
**Post date:** [7 January 2019 18:41 UTC](https://discourse.nodered.org/t/debug-in-node-red-blockly-node/5802/4 "2019-01-07T18:41:59Z")

</div>

Yes i meant debugging node-red in general

Thanks for the answer

---

<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:** [7 January 2019 19:21 UTC](https://discourse.nodered.org/t/debug-in-node-red-blockly-node/5802/5 "2019-01-07T19:21:48Z")

</div>

> [@Poul89](#):
>
> i meant debugging node-red in general

The Javascript code inside **function nodes** cannot be debugged, but if you create your own **custom node** then you can debug it (like you can debug all other Node-RED nodes). I have explained [here](https://discourse.nodered.org/t/how-to-debug-an-own-node-with-the-node-js-debugger/5737/4) how you can debug Node-RED using a Chrome debugger, in case you ever need it...
