# Starting node-red in debug mode in ubuntu- how to

**URL:** <https://discourse.nodered.org/t/starting-node-red-in-debug-mode-in-ubuntu-how-to/17662>\
**Category:** General\
**Created:** [8 November 2019 00:50 UTC](https://discourse.nodered.org/t/starting-node-red-in-debug-mode-in-ubuntu-how-to/17662 "2019-11-08T00:50:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![uma](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@uma](https://discourse.nodered.org/u/uma)\
**Post date:** [8 November 2019 00:50 UTC](https://discourse.nodered.org/t/starting-node-red-in-debug-mode-in-ubuntu-how-to/17662/1 "2019-11-08T00:50:02Z")

</div>

In windows, i would simply add '--inspect' as an argument to node in C:\Users\<username\>\AppData\Roaming\npm\node-red.cmd. I am unable to find the shell script in ubuntu- executing 'which node-red' in my ubuntu instance gave me /usr/bin/node-red which is the actual javascript file rather than the shell script used to launch node-red.

---

<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 November 2019 09:00 UTC](https://discourse.nodered.org/t/starting-node-red-in-debug-mode-in-ubuntu-how-to/17662/2 "2019-11-08T09:00:17Z")

</div>

The default install on Linux autostarts via systemd so you need to use the `systemctl stop node-red` command to stop the default instance. Then you can manually start node red using the `node-red` command.

To make things easier, I recommend editing the `~/.node-red/package.json` file and adding some npm scripts including one to manually run NR with the inspect option & ones to stop, start and restart node-red. You might want to also add one to show the node-red log output at the terminal, something like `sudo journalctl -u node-red -f -n 0 -o cat`.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [8 November 2019 09:05 UTC](https://discourse.nodered.org/t/starting-node-red-in-debug-mode-in-ubuntu-how-to/17662/3 "2019-11-08T09:05:45Z")

</div>

> [@TotallyInformation](#):
>
> The default install on Linux autostarts via systemd

@uma just to clarify - the above statement is only true if you used our install script. If you manually installed with `npm install ....` then it will not be setup as a systemd service. In which case, you should find you have a `node-red-pi` command - this _should_ let you specify the `--inspect` argument
