![Gitter](https://badges.gitter.im/Join Chat.svg)
This repository contains an experimental debug extension for node.js that ships with VS Code and uses the Chrome Debugging Protocol, which Node now exposes via the --inspect
flag, only in Node versions 6.3+. It's built on the vscode-chrome-debug-core library.
This extension will eventually have feature-parity with vscode-node-debug, but isn't there yet. An overview is recorded here and you can see issues in the vscode-node-debug2 repo and the vscode-chrome-debug-core repo. For the most part, you should be able to set "type": "node2"
in your existing Node launch config and have things work the same, as long as it's running in Node v6.3+.
See an overview of debugging Node.js in VS Code here.
- If something doesn't work, please try on the original Node debug adapter (
"type": "node"
) and this one, and file an issue for any regression. - If there may be an issue with sourcemaps, try running with sourcemaps disabled and setting breakpoints in the generated script.
- Or try adding 'debugger' statements to ensure that the debugger pauses.
- Set
"diagnosticLogging": true
or"verboseDiagnosticLogging": true
in your launch config. The adapter will log its own diagnostic info to the console, and to this file:~/.vscode/extensions/ms-vscode.vscode-node-debug2/vscode-node-debug2.txt
. This is useful in figuring out why breakpoints don't resolve, or why sourcemaps don't work properly, or anything else. This is often useful info to include when filing an issue on GitHub. Note that it will include paths and file names from your machine. - Watch for error messages in the debug console or terminal. There may be bugs on Node's side and it could crash.
Contributions are welcome, please see CONTRIBUTING.txt.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.