In my local machine, I can debug my Node.js app with Chrome DevTools. Since using goormIDE I have no idea how to debug it in the same way. Is there a way to do that?
1 Answer
In goormIDE, run your Node.js app with option
--inspect=0.0.0.0:9229For example,
node --inspect=0.0.0.0:9229 app.js0.0.0.0is to allow the connection from DevTools, which is outside of the goormIDE container.And
9229is to specify the port that will be using.Open menu
CONTAINER-Port Forwarding Configurationand register a port9229Click the copy button at the
Commandcolumn, then the IP:port value will be copied.
In Chrome, open a new tab and go to
chrome://inspectEnable
Discover network targetsoption and clickConfigure...at the right.Paste the IP:port value you copied at step 3, and press Enter then click
Done.Then you may see your app is listed at
Remote Targetand ready to be inspected.