Debugging 在vscode中调试Serverless时未命中断点
在VSCode中调试基于无服务器的应用程序时,我的断点都不处于活动状态 launch.jsonDebugging 在vscode中调试Serverless时未命中断点,debugging,visual-studio-code,serverless-framework,Debugging,Visual Studio Code,Serverless Framework,在VSCode中调试基于无服务器的应用程序时,我的断点都不处于活动状态 launch.json { "configurations": [ { "console": "integratedTerminal", "cwd": "${workspaceRoot}", "name": "Debug", "port": 5858, "request": "launch", "runtimeArgs": [
{
"configurations": [
{
"console": "integratedTerminal",
"cwd": "${workspaceRoot}",
"name": "Debug",
"port": 5858,
"request": "launch",
"runtimeArgs": [
"run-script",
"vscode:debug"
],
"runtimeExecutable": "npm",
"type": "node"
}
],
"version": "0.2.0"
}
mypackage.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"
},
....
当我从菜单中选择“开始调试”时,所有红色断点都变为灰色,程序只在断点上执行而不停止
我正在Mac上运行Node6.11.2,无服务器1.23.0。谢谢大家。这是我的launch.json,它允许我使用断点
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/node_modules/.bin/serverless",
"args": [
"offline",
"start",
"--skipCacheInvalidation"
],
"env": {
"NODE_ENV": "development"
}
}
我正在使用无服务器脱机在本地运行。我也在使用webpack和babel。skipcacheinvalization
就是为了这个
我希望这为你指明了正确的方向