Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixes for VSCode Debug in Windows#3692

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
JackGlobetrotter wants to merge1 commit intoelectron-react-boilerplate:main
base:main
Choose a base branch
Loading
fromJackGlobetrotter:main

Conversation

JackGlobetrotter
Copy link

@JackGlobetrotterJackGlobetrotter commentedApr 28, 2025
edited
Loading

As mentioned in multiple issues, debugging has not been working well in VSCode neither for for Main and Renderer processes.
This fixes these issues, thus closing:#3689#3472

It proposes the following changes:

  • Creating multiple launch configurations according to current setup in thestart script inpackage.json
    • Electron: Pre launches a new script calledstart:VSCode witch is similar tostart but does not includenpm run start:renderer
    • Electron: Renderer start thestart:renderer:VSCode script
      • launches new webpack config file (webpack.config.renderer.dev.vscode.ts), similar to previouswebpack.config.renderer.dev.ts, which does not launchstart:main as this seems to prevents debugging in VSCode
    • Electron: Main start thestart:main script, which enables debugging breakpoints for VSCode
    • Electron: Renderer Attach starts as before attaching to port 9223
  • Edit inmain.ts to enable remote debugging port
    let port = '9223';if (process.env.MAIN_ARGS) {  if (process.env.MAIN_ARGS) {     port = (([...process.env.MAIN_ARGS.matchAll(/"[^"]+"|[^\s"]+/g)]     .flat()    .filter(str=>str.includes('debugging-port'))[0]||"=9223").split('=')[1])  } }app.commandLine.appendSwitch("remote-debugging-port", port)

ATTENTION: This config has only been tested in VSCode running on Win11! More testing is definitely needed! And it should be tested in different environments before merging!

rdmiller reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@JackGlobetrotter

[8]ページ先頭

©2009-2025 Movatter.jp