[英]Can Visual Studio Code be configured to launch with nodemon
I have installed nodemon
as a global package in my system.我已经在我的系统中安装了
nodemon
作为全局包。 It works when I executed nodemon
in cmd.它在我在 cmd 中执行
nodemon
时起作用。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是当我在这个
launch.json
文件中使用 vscode 时,vscode 会抛出这个异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件 XXX\\XXX\\XXX\\XXX\\nodemon 不存在
the launch.json is: launch.json 是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我在 runtimeExecutable 中擦除
runtimeExecutable
时,它与 node 完美运行
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
I have installed nodemon
as a global package in my system.我已经在系统
nodemon
安装为全局软件包。 It works when I executed nodemon
in cmd.当我在cmd中执行
nodemon
时,它可以工作。
But when I am using vscode with this launch.json
file, vscode throws this exception:但是,当我在这个
launch.json
文件中使用vscode时,vscode抛出此异常:
request launch: runtime executable XXX\\XXX\\XXX\\XXX\\nodemon does not exists
请求启动:运行时可执行文件XXX \\ XXX \\ XXX \\ XXX \\ nodemon不存在
the launch.json is: launch.json是:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "app.js",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": nodemon,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"preLaunchTask": "",
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
when I erase the nodemin in runtimeExecutable
it runs perfectly with node当我抹去nodemin
runtimeExecutable
它与节点运行完全
It works fine for me, in the main Terminal.它在主终端中对我来说很好。 Do not use VS code terminal, use the main system terminal.
不要使用 VS 代码终端,使用主系统终端。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.