You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The js created by debug builds has enough information in the @line comments that we should be able to create a source map. We should have a script that does this ;)
Should create an embedded source map: use data urls in //# sourceMappingURL=... and sourcesContent to completely embed the source map in the emscripten output so there aren't any external dependencies
Question:
When there isn't an //@line comment for a line in the js output, does that mean that it is generated by the compiler and doesn't directly represent something from the source code or that you should infer the line number based on the previous //@line comment?
The text was updated successfully, but these errors were encountered:
When there isn't, that means that llvm did not say anything about the original line number. We can probably use the previous line number, but there is no guarantee.
Pasting some irc discussion about this with @int3 who might work on this:
so yes, the idea is to not modify the compiler at all. instead write an external script
the script takes the current -g output in -O0, and parses (in node or python, whichever we want) that out into sourcemaps format
for optimized builds, we can almost do the same in fact. again no need to modify the compiler and thread any debug info through it. instead, save emcc-4-original.js, which has debug info printed out (just like -O0)
then correlate emcc-4-original to the final emcc-6-js-opts
looking at some examples of those (from EMCC_DEBUG=1) should give an idea, i think this might not be too hard actually
int3
added a commit
to int3/emscripten
that referenced
this issue
Jun 7, 2013
The js created by debug builds has enough information in the @line comments that we should be able to create a source map. We should have a script that does this ;)
Notes:
//# sourceMappingURL=...
andsourcesContent
to completely embed the source map in the emscripten output so there aren't any external dependenciesQuestion:
//@line
comment for a line in the js output, does that mean that it is generated by the compiler and doesn't directly represent something from the source code or that you should infer the line number based on the previous//@line
comment?The text was updated successfully, but these errors were encountered: