Download and Install Node.js
Download and install Node.js from nodejs.org with default configurations.
How To Debug Node.js Code In Visual Studio Code?
Follow these steps to debug on VS Code:
- Select the Run and Debug button from the”“Ru”” icon in the sidebar or press F5. Visual Studio Code will try to run your currently active file.
- Visual Studio Code will try to detect your debug environment automatically. Our debugger is now attached, and Visual Studio Code has automatically found your program.
- Debugging will begin, and you will have the Debug Console panel at the bottom of the code editor, which shows debugging output.
There it is!We’vee just debugged a simple Node.js code in Visual Studio Code. You can play around with the debugging environment using the breakpoints and the debug toolbar. Follow our debugging walkthrough to learn more about using breakpoints and the debug toolbar.