Home > database >  Are there debug tools for express in visual studio code?
Are there debug tools for express in visual studio code?

Time:12-06

Is there a debug tool for Express in VSCode?

I'm logging messages to the console but I'd rather set breakpoints and step through the code.

CodePudding user response:

It does support it.

Though it says that it needs a launch config, although others have said it works for them without a launch config.

https://code.visualstudio.com/docs/nodejs/nodejs-debugging

This is what was shown in the debug view:

enter image description here

It looks like there are instructions on creating a launch config here.

https://code.visualstudio.com/docs/editor/debugging#_launch-configurations

It basically says to click the "Create launch config" link and then select Node.js from the list.

enter image description here

Since Express is a library that runs in node js, getting debug support in node js is also getting debug support for express.

Thanks me. Good job.

  • Related