【发布时间】:2015-07-24 22:13:11
【问题描述】:
我刚刚安装了 Visual Studio 代码,并尝试在 IDE 中运行我的 MEANJS 应用程序,VisualStudio 创建了一个 ./settings 文件夹,其中包含一个包含以下配置的 launch.json 文件运行项目。
我通常使用 MEANJS 工作流所做的只是在应用程序的根文件夹中键入 grunt 并调用包含所有启动我的应用程序的作业。
我想尝试通过按下按钮在 Visual Studio Code 中实现相同的效果,并运行 grunt 任务,但我不知道从哪里开始。
{
"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 Project",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
// Workspace relative or absolute path to the program.
"program": "gruntfile.js",
// Automatically stop program after launch.
"stopOnEntry": false,
// 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,
// Optional arguments passed to the runtime executable.
"runtimeArgs": [],
// Environment variables passed to the program.
"env": { },
// Use JavaScript source maps (if they exist).
"sourceMaps": false,
// If JavaScript source maps are enabled, the generated code is expected in this directory.
"outDir": null
},
{
"name": "Attach",
"type": "node",
// TCP/IP address. Default is "localhost".
"address": "localhost",
// Port to attach to.
"port": 3000,
"sourceMaps": false
}
]
}
有什么建议吗?
【问题讨论】:
标签: javascript visual-studio-code