-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
fix: Update VS Code debugger script #1370
Conversation
Fix the debugger script to fix electron#1369, while still supporting the fix for electron#535.
The current documentation is incorrect because the script is expected to be run from a different location. This change means the script can be run from either location, which is great! For those wondering, for now, you can debug the main (and renderer!) process with this configuration: {
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Electron: Main",
"runtimeExecutable": "${workspaceFolder}/node_modules/@electron-forge/cli/script/vscode.sh",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/@electron-forge/cli/script/vscode.cmd"
},
"runtimeArgs": ["--remote-debugging-port=9223"],
"cwd": "${workspaceFolder}",
"timeout": 60000
},
{
"name": "Electron: Renderer: App",
"type": "chrome",
"request": "attach",
"port": 9223,
"webRoot": "${workspaceFolder}",
"timeout": 120000,
"url": "http://localhost:3000/app"
}
],
"compounds": [
{
"name": "Electron: All",
"configurations": ["Electron: Main", "Electron: Renderer: App"]
}
]
} Edit: Tested on macOS only. As an aside, how does one contribute a change to the electron-forge documentation? I think this is one for @MarshallOfSound. |
@chetbox , I was seeking a solution to have the VS Code debugger working for both main and renderer processes and was able to get it working by modifying your config. I am using electron-forge with the webpack template
|
Can confirm that the temporary solution by @chetbox worked for me on Linux 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, as it handles both the old and new way. I think it can be merged.
@chetbox, it is in the electron-forge-docs repo, and there's already a PR to update the docs: electron-forge/electron-forge-docs#4. |
What's the holdup for this being merged in? Debugging on Mac is currently broken… |
Should this issue be closed? I ended up with the following workaround in my launch.json
|
Why was this closed? |
Fix the debugger script to fix #1369, while still supporting the fix for #535.
Summarize your changes:
Given the environment in #1369, this change supports running the debugger script, without breaking changes for users relying on the previous path structure. (Assuming it worked previously?)