【发布时间】:2018-03-21 23:07:51
【问题描述】:
在 VSCode 中调试我的基于无服务器的应用程序时,我的断点均处于活动状态。
launch.json
{
"configurations": [
{
"console": "integratedTerminal",
"cwd": "${workspaceRoot}",
"name": "Debug",
"port": 5858,
"request": "launch",
"runtimeArgs": [
"run-script",
"vscode:debug"
],
"runtimeExecutable": "npm",
"type": "node"
}
],
"version": "0.2.0"
}
我的 package.json
...
"scripts": {
...
"vscode:debug": "export SLS_DEBUG=* && node --inspect=5858 --debug-brk --nolazy ./node_modules/.bin/serverless invoke local -s local -f customerAlexa -p ./test/requests/FindAgent-First-GoodZip.json"
},
....
当我从菜单中选择 Start Debugging 时,所有的红色断点都变灰,程序直接执行而不在断点处停止。
我在 Mac 上运行 Node 6.11.2、Serverless 1.23.0。谢谢大家。
【问题讨论】:
标签: debugging visual-studio-code serverless-framework