官方文档:
https://code.visualstudio.com/docs/editor/debugging
https://code.visualstudio.com/docs/editor/debugging#_compound-launch-configurations
Here is the launch configuration generated for Node.js debugging:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
}
]
}
If you go back to the File Explorer view (Ctrl+Shift+E), you'll see that VS Code has created a .vscode
folder and added the launch.json
file to your workspace.
Note: You can debug a simple application even if you don't have a folder open in VS Code, but it is not possible to manage launch configurations and set up advanced debugging. The VS Code Status Bar is purple if you do not have a folder open.