# Add Docs on VS Code to debug Node-RED and nodes

**URL:** <https://discourse.nodered.org/t/add-docs-on-vs-code-to-debug-node-red-and-nodes/11891>\
**Category:** Developing Nodes\
**Created:** [5 June 2019 21:14 UTC](https://discourse.nodered.org/t/add-docs-on-vs-code-to-debug-node-red-and-nodes/11891 "2019-06-05T21:14:16Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [23 February 2021 21:28 UTC](https://discourse.nodered.org/t/add-docs-on-vs-code-to-debug-node-red-and-nodes/11891/9 "2021-02-23T21:28:42Z")

</div>

This works for me every time...

> [@How to proper debug custom node](https://discourse.nodered.org/t/how-to-proper-debug-custom-node/9308/13):
>
> This is how I debug a custom node in VS Code... It works for me however since this is a dist version of node-red its difficult sometimes to debug client side issues. Other than that, debug stop points work in my node js files. For debuging my .html files, i enter debugger into the function & open F12 (chrome debugger stops on the debugger statement) Setup... Install node-red as per instructions on [nodered.org](http://nodered.org) Run it one time so that .node-red folder is generated Install own node... cd c:…

And to debug your function node code, simply enter the key word `debugger` in the function code on a separate line (usually at the top of the code), deploy the code. Then fire the function (via an inject or whatever)

---

_[View the full topic](https://discourse.nodered.org/t/add-docs-on-vs-code-to-debug-node-red-and-nodes/11891)._
