我希望在AngularJS教程中尝试使用AngularJS,比如第一步,并开始调试和构建。
我能够让它运行,但这有点麻烦,VSCode不喜欢它。
{
"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\\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": "run.bat",
// 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
}
]
}
我得到一个“错误连接失败”,即使它实际上运行在一个单独的命令提示符窗口。
是否有一种方法可以让VSCode调试这样一个简单的应用程序,该应用程序只使用package.json启动如下:
"start": "http-server -a 0.0.0.0 -p 8000"
谢谢,德里克
发布于 2015-05-01 09:38:08
Visual代码只支持Node和Mono调试,它不支持在浏览器中调试客户端JavaScript。
如果希望在浏览器中调试Javascript,请使用浏览器工具。如果您想在node.js中试用VSCode调试支持。从一个示例node.js或快递应用程序开始,然后按照Visual代码网站中的方向设置调试。
如果希望看到Visual代码支持调试,可以在用户语音中对其进行表决。
https://stackoverflow.com/questions/29990530
复制