intel / zephyr.js

JavaScript* Runtime for Zephyr* OS
Other
180 stars 64 forks source link

Introduce source map to allow debugging #1879

Open grgustaf opened 6 years ago

grgustaf commented 6 years ago

When debugging with jerryscript-debugger-ts project, since we concatenate all sources into one big file for our JS "modules", the debugger shows the one big source file. By using a source map, we could retain the original source format by mapping lines in the "compiled" source back to the original sources.

This would require an extra step of map generation at the time of concatenation, and then then the debugger proxy would have to be pointed to the original sources and this map to be able to piece together all the info needed.

This is mostly a feature needed in jerryscript-debugger-ts so we should really open an issue there, but part of it is ZJS-specific and would need to be handled here.