我正在为客户端开发一个多项目解决方案,我们正在尝试让所有构建自动进入预定的BIN文件夹.所有的C++项目都很容易被移除,但Java方面已证明不那么容易配置.当我转到项目的属性并转到Build-> Packaging时,"JAR文件:"文本框显示一个指向"dist/App.jar"的只读文本框(我想将其更改为".. /../../bin/App.jar".有关如何做到这一点的任何想法?
我可以让 VSCode 使用 NPM 运行脚本启动我的应用程序,然后附加到结果进程进行调试吗?
我的项目从 nodemon 通过 NPM 脚本开始(执行 babel 等)。但是,当应用程序启动时,VSCode 的调试器不会附加(跳过断点)。
// 来自 package.json
"scripts": { "debug": "nodemon --inspect --exec babel-node src/app.js" }
Run Code Online (Sandbox Code Playgroud)
// 来自launch.json
{
"type": "node",
"request": "launch",
"name": "Debug",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"debug"
],
"address": "localhost",
"port": 9229,
"protocol": "auto",
"restart": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"autoAttachChildProcesses": true
}
Run Code Online (Sandbox Code Playgroud)
调试器似乎启动了,但我放置在几个测试调用旁边的断点被忽略了。这是终端输出:
[nodemon] 1.19.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `babel-node --inspect src/app.js`
Debugger listening on ws://127.0.0.1:9229/13ef6ca8-40da-4741-854a-467e4230b2a7
For …Run Code Online (Sandbox Code Playgroud)