Skip to content

Minimal interactive debugger for runtime #763

Open

Description

@MetaB0y

Is your feature request related to a problem? Please describe.

Having stack output in runtime debugger is a simple but incredibly useful feature. The speed of runtime allows me to debug instantly instead of waiting tens of seconds or even minutes until the desired state is reached on devnet.

However, it doesn't provide any functionality except for showing the current line and stacktrace.

Describe the solution you'd like

Ideally, I would like to have feature parity with devnet debugging which means support for interactive debugger in Chromium. However, I understand it might be a huge amount of work.

Instead, I propose to reach for low-hanging fruits. An approach I propose is minimal interactivity:

  • go to line X in file Y
  • go to the next line
  • print global state
  • print contract balances.
  • print list of opted-in accounts

Some additional features which could be added later:

  • print contract call trace (for contract-to-contract calls and ABI)
  • [in near future] print box storage contents

An alternative (even simpler!) approach would be to let user to set breakpoint[s] in advance, stop execution when it is reached, and let the user probe runtime state using already available methods such as runtime.getGlobalState.

Activity

  1. robert-zaremba commented on Sep 19, 2022

    @robert-zaremba
    Member

    This normally works. runtime is a JS object run in Node, so you can run debugger as with any other Node project.
    But good point we will add a tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions