【发布时间】:2018-01-06 16:15:42
【问题描述】:
我有一个基于 electron-hello-world 项目的基本 HelloWorld 应用程序,在 VSCode 上运行,并且能够启动调试会话并且应用程序启动正常。
我在 main.js 上设置了一个断点,但它似乎显示为灰色并显示一条消息:
Breakpoint ignored because generated code not found (source map problem?)
这是我的 launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"program": "${workspaceRoot}/main.js",
"port": 9222,
"sourceMaps": true,
"diagnosticLogging": true,
"outFiles": [
"${workspaceRoot}"
]
}
]
}
任何帮助将不胜感激。
【问题讨论】:
标签: node.js debugging visual-studio-code electron breakpoints