Open
Description
I would like to be able to use the debugger with code loaded from snapshots. Because of device limitations, it may not be possible to parse the source on the device itself. The current debugging approach assumes that the device itself is capable of parsing the JS source.
To support debugging of snapshots, I think we need:
- The "offline" JerryScript parser should be able to serialize the collected debug info to a separate file, which I'll refer to as the "sourcemap" (would the commonly used sourcemap format work for this?)
- The debugger should be able to load debug info "out of bounds" by deserializing the sourcemap file (this would also pave the way for on-the-fly attachment of the debugger, I think)
- The "disabled breakpoint" instructions should be emitted into the snapshot too (not sure if this is the case already)
- Optional: "tag" the snapshot data with the filename of the sourcemap matching the snapshot. This way, the debugger can attempt to find the sourcemap file automatically (similar to the sourcemap comment that browser's use).