【发布时间】:2015-08-04 22:04:49
【问题描述】:
我下载了 Visual Studio Code,但不知道如何配置调试器。
我正在学习编程,但我不知道如何配置它?
有人帮我解决这个问题吗?
这是你需要配置的。
{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Launch app.js",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
// Workspace relative or absolute path to the program.
"program": "app.js",
// Automatically stop program after launch.
"stopOnEntry": true,
// Command line arguments passed to the program.
"args": [],
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
"cwd": ".",
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
"runtimeExecutable": null,
// Environment variables passed to the program.
"env": { }
},
{
"name": "Attach",
"type": "node",
// TCP/IP address. Default is "localhost".
"address": "localhost",
// Port to attach to.
"port": 5858
}
]
}
【问题讨论】:
-
你想调试什么?我以前不必在 Visual Studio 中配置调试器,它就可以工作。
-
约翰爸爸在这里有一些关于调试的好信息johnpapa.net/debugging-with-visual-studio-code
-
这是关于远程调试的吗?您需要更清楚地说明您的要求。
-
查看这篇文章来配置Nodejs Express调试设置wiki.workassis.com/…
-
VSCode 有一个扩展 - 如this post 的答案中所列。
标签: debugging visual-studio-code