Skip to content

Debugger support for snapshots #1660

Open
@martijnthe

Description

@martijnthe

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:

  1. 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?)
  2. 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)
  3. The "disabled breakpoint" instructions should be emitted into the snapshot too (not sure if this is the case already)
  4. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    debuggerRelated to the debuggerdiscussionOngoing discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions