Skip to content

Rethink debug lifecycle #1210

Open
Open

Description

@syntactically

Currently, the initial breakpoint set up when creating a sandbox is set on the entrypoint function, which means that, when creating a sandbox from an initialised snapshot, it is never set up or executed, and a debugger has no easy way to attach.

Relatedly, the debugging infrastructure (and the initial breakpoint) is/are set up in Sandbox::new(), which means that whether a sandbox has a debug thread or not is decided once, at sandbox creation time, but there is also only one place to attach a debugger (at sandbox initialisation time): future function calls, or restored sandboxes, might not be easy to debug, even though they have a debug thread consuming resources.

See also: this comment

Activity

  1. ludfjig commented on Feb 4, 2026

    @ludfjig
    Contributor

    Note that #1120 might further change debugging due to resetting debug register on snapshot-restores, which could potentially discard breakpoints etc. One possible solution might be to not reset debug registers if gdb cargo feature is enabled?

  2. added
    lifecycle/confirmedBug is verified or proposal seems reasonable
    and removed on Feb 25, 2026
  3. added this to the v0.15.0 milestone on Feb 25, 2026
  4. dblnz commented on Feb 25, 2026

    @dblnz
    Contributor

    This is a note to think about the future of debugging a sandbox.
    Currently, we rely on the entrypoint function breakpoint to allow the user the time to add new breakpoints, but if a sandbox has been snapshotted after the initialise phase, that won't work.

  5. simongdavies commented on Feb 25, 2026

    @simongdavies
    Member

    Additionally we may want to consider that restore/resetting a sandbox might work very differently as we move towards using Snapshots as the basis for creating Sandboxes

  6. modified the milestones: v0.15.0, Backlog on Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/confirmedBug is verified or proposal seems reasonable

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions