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

Breakpoint ignored because generated code not found (source map problem?) #4

Closed
nazar322 opened this issue Mar 25, 2020 · 3 comments
Closed

Comments

@nazar322
Copy link
Contributor

Having launched Main + Renderer profile VSCode can't hit breakpoints set in a .ts file for the renderer process.
It says Breakpoint ignored because generated code not found (source map problem?)
Breakpoints set in main.ts work.
image
image

@frederiksen
Copy link
Owner

Could be that the launch.json file need tweaking. Try reading this: #2

@nazar322
Copy link
Contributor Author

nazar322 commented Mar 25, 2020

The launch.json is original except port numbers for both profiles and in the debug output I see the verbose output so the debugger attached properly (renderer process).

It must be a source map problem because what I did is I navigated to .dist\main folder and removed electron-main.js.map. After that, I started the main process debugging and the breakpoint that used to work did not hit and the VS showed the same notification about breakpoint being ignored. I then restored the electron-main.js.map and it started to break and work again.

I am new to this but I think there must be the same corresponding map files for .ts files in the renderer process. I will dig towards tsc as it should generate map files if I'm not mistaking.

@frederiksen Can you hit the same breakpoint as on my screenshot on your end (ipc.service.ts line 12 or app.component.ts line 16)?

@nazar322
Copy link
Contributor Author

I managed to find a solution.
Go to launch.json and change line #17 to "webpack:///./*": "${workspaceRoot}/src/renderer/*"

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