# \[ANNOUNCE\] node-red-contrib-inspector: beta

**URL:** <https://discourse.nodered.org/t/announce-node-red-contrib-inspector-beta/54855>\
**Category:** Developing Nodes\
**Created:** [8 December 2021 06:30 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-inspector-beta/54855 "2021-12-08T06:30:10Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [8 December 2021 06:30 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-inspector-beta/54855/1 "2021-12-08T06:30:10Z")

</div>

Hi folks,

Oh my god... Doing Node-RED developments already a couple of years, so I always need to start my Node-RED via NodeJs in _ **debug mode** _. Which allows me to connect to NodeJs via a debugger (e.g. Chrome Developer tools or VSCode or whatever).

However to run NodeJs in debug mode, you need to pass _ **extra startup parameters** _:

```auto
node --inspect=127.0.0.1 /usr/bin/node-red

```

But adding such startup parameters isn't very convenient, because you always need to start messing with the default startup commands. E.g. I have spend at the time being quite some time to [debug](https://discourse.nodered.org/t/debugging-nodejs-in-node-red-docker-container/21370) Node-RED in a docker container.

And suddenly last night I though: it is also possible to _ **turn on/off debug mode live in a running Node-RED instance** _ via the NodeJs Inspector API. Which means I have been messing with startup command parameters for nothing all that time 🥴.

Anyway I don't need that anymore because now I can finally use my new [node-red-contrib-inspector](https://github.com/bartbutenaers/node-red-contrib-inspector/blob/main/README.md) node 🍾 🥂 🥳

As always, all _"constructive"_ feedback is very welcome!!

Bart

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 December 2021 09:14 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-inspector-beta/54855/2 "2021-12-08T09:14:43Z")

</div>

Very nice Bart! Should be a really useful addition to the debugging arsenal. Will give it a go when I get a second. I've only ever run debug on my local dev instance, never on my live instance so this should be very useful for that.

For reference, on my dev instance, I simply use an npm script in package.json so I don't need to remember the syntax. My dev instances are only ever manually started (well, via PM2 usually).

---

<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:** [12 December 2021 10:32 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-inspector-beta/54855/3 "2021-12-12T10:32:32Z")

</div>

I have fixed some things:

1. At startup detect whether the inspector is already running (e.g. when NodeJs has been started with --inspect startup command arguments, or after a redeploy).

2. After a deploy don't close the inspector, otherwise you need to connect with your debugger again.

For my developments this works fine now, so good enough for now (and for me)...

Version _ **1.0.1** _ is now available in the palette:

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 February 2022 10:33 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-inspector-beta/54855/4 "2022-02-10T10:33:15Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
