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

fix electron frontend debug configuration #10101

Merged

Conversation

paul-marechal
Copy link
Member

@paul-marechal paul-marechal commented Sep 14, 2021

For some reason TS files are loaded as
webpack://@theia/example-electron/* in Electron's Chrome DevTools, and
it confused VS Code's JS debugger.

Add a sourceMapPathOverride to point the debugger to the right place
on disk.

Closes #9827

How to test

  • Build the Electron example application.
  • Place breakpoints in frontend code.
  • Run the Launch Electron Backend & Frontend debug configuration.
  • Breakpoints should be attached and hit.

Review checklist

Reminder for reviewers

For some reason TS files are loaded as
`webpack://@theia/example-electron/*` in Electron's Chrome DevTools, and
it confused VS Code's JS debugger.

Add a `sourceMapPathOverride` to point the debugger to the right place
on disk.
@paul-marechal paul-marechal force-pushed the mp/electron-source-map-fix branch from 1158abe to c22381f Compare September 14, 2021 22:04
@paul-marechal
Copy link
Member Author

If someone knows where this webpack://@theia/example-electron/* source map name comes from and why it broke recently I'm all ears... Until then, this PR will do.

@vince-fugnitto vince-fugnitto added contributor experience issues related to the contributor experience debug issues that related to debug functionality electron issues related to the electron target labels Sep 15, 2021
Copy link
Contributor

@alvsan09 alvsan09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested as per instructions and can confirm the solution works! 👍

@paul-marechal, how would you like to proceed as there is an existing proposed fix at #9827?

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that I am able to debug the frontend code using the attach to electron frontend configuration 👍

@paul-marechal paul-marechal merged commit 8618183 into eclipse-theia:master Sep 16, 2021
@paul-marechal paul-marechal deleted the mp/electron-source-map-fix branch September 16, 2021 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor experience issues related to the contributor experience debug issues that related to debug functionality electron issues related to the electron target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants