gpt4 book ai didi

node.js - 调试Electron应用程序: Breakpoints not working (“Breakpoint ignored because generated code not found” )

转载 作者:行者123 更新时间:2023-12-03 12:35:59 27 4
gpt4 key购买 nike

我有一个基于VSCode上运行的electron-hello-world项目的基本HelloWorld应用程序,能够启动调试 session ,并且该应用程序可以正常启动。

我在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}"
]
}
]
}

任何帮助将非常感激。

最佳答案

如果您生成的代码在“$ {workspace Root}”中,则outFiles应该是"outFiles": [ "${workspaceRoot}/*.js" ]
有关更多信息link

关于node.js - 调试Electron应用程序: Breakpoints not working (“Breakpoint ignored because generated code not found” ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45409987/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com