Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用vscode调试main进程可以attach debugger但是断点处不停 #52

Open
bonhommie opened this issue May 21, 2022 · 2 comments
Open

Comments

@bonhommie
Copy link

配置了launch.json, 使用vscode调试渲染进程正常,但是调试主进程虽可以attach debugger但是无法在断点处停止?期待解决

image
image
image

@yuanhongyu123
Copy link

我参考了你的方案可以调试了。感谢
index.ts加上nodejs的source-map应该就可以了
import sourceMapSupport from "source-map-support";
sourceMapSupport.install();

下面是我的launch.js

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"compounds": [
{
"name": "Debug App",
"configurations": [
"Debug Main Process",
"Debug Renderer Process"
],
}
],
"configurations": [
{
"name": "Debug Main Process",
"type": "node-terminal",
"request": "launch",
"command": "yarn run dev",
"cwd": "${workspaceFolder}",
},
{
"name": "Debug Renderer Process",
"port": 9223,
"request": "attach",
"type": "chrome",
"timeout": 60000,
"skipFiles": [
"<node_internals>/",
"${workspaceRoot}/node_modules/
",
"${workspaceRoot}/dist-electron/**"
]
},
]
}

@bonhommie
Copy link
Author

bonhommie commented Feb 23, 2023 via email

@umbrella22 umbrella22 pinned this issue Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants