-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
Sourcemap file is not working in the renderer using require() #13730
Comments
This issue persists in Electron 3.0.9 |
Until it is fixed I use vscode debugger. Here is my launch.json
You must remplace the "url" value with the correct path (see https://github.com/Microsoft/vscode-chrome-debug/issues/438) Both debug sessions main and renderer supports sourcemap correctly. |
This issue persists in Electron 4.0.2 + TypeScript 3.2 |
@remss wrote
Thanks! This works for me. I changed the line (similar to)
to
PS:
|
I was able to get sourcemaps working by enabling both |
The workaround using |
vscode also works with "url": "file: /// $ {workspaceRoot} /dist/**/*.html" |
Maybe related #22996 (comment) |
The Electron version reported on this issue is no longer supported. See our supported versions documentation. If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know. Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated. |
With a project like this:
In
index.html
userequire('dist/renderer.js')
from the HTML page.Expected Behavior
The console messages triggered by
dist/renderer.js
should havesrc/renderer.ts
as origin in devtools because the sourcemap filerenderer.js.map
points to../src/renderer.ts
The source file
src/renderer.ts
should be listed in the source panelActual behavior
The console messages have
dist/renderer.js
as origin in devtoolsThe source file
src/renderer.ts
does not appear in the source panelTo Reproduce
Screenshots
![image](https://user-images.githubusercontent.com/1586257/42933574-61784882-8b45-11e8-818f-d2cec41c247f.png)
The text was updated successfully, but these errors were encountered: