Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal interactive debugger for runtime #763

Open
MetaB0y opened this issue Aug 11, 2022 · 1 comment
Open

Minimal interactive debugger for runtime #763

MetaB0y opened this issue Aug 11, 2022 · 1 comment
Assignees

Comments

@MetaB0y
Copy link

MetaB0y commented Aug 11, 2022

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.

@robert-zaremba
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants