I want to debug Node-red project source code. When I type a command as the following
node --debug-brk red.js
and open my Visual Studio Code as the following
I could achieve debug process partly. But I want to debug on front-end side which is view.js. I can not debug view.js aforementioned method. If I would try to debug via Chrome or another browser I cannot see the view.js file in Sources segment.
How can I debug a js file if I would not see on the Web Browser.
Thanks in advance,
When Node-RED runs normally it uses a compressed build of all the browser side javascript, this is why you can't find the view.js as it's been minified and bundled up with a bunch of other stuff.
If you have downloaded the source from github the instructions include a step which tells you to run
grunt build
this is what does that minifying. (bottom of here: http://nodered.org/docs/getting-started/installation)If you run
grunt dev
instead it will start Node-RED without using the minified content and you should get the full version of the javascript to work with.