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

Foundry debugger modify value during execution #9409

Open
publicqi opened this issue Nov 25, 2024 · 3 comments
Open

Foundry debugger modify value during execution #9409

publicqi opened this issue Nov 25, 2024 · 3 comments
Assignees
Labels
A-debugger Area: debugger T-feature Type: feature

Comments

@publicqi
Copy link
Contributor

Component

Forge

Describe the feature you would like

Background

I am working on some small new features on forge debugger. I added a new "control" pane to display misc infos. There's a section called "Command", and I want the user be able to interact with the debugger. For example, it will now show input buffer (i.e. number + action)
telegram-cloud-photo-size-5-6204038009934954246-y

New feature discussion

Currently forge debugger executes a transaction and collect all execution steps and display them. It lacks dynamic modifying values.

Although this requires a big refactor, it will be easier for debugging for special needs. One can simulate different scenarios and edge cases without altering the source code or redeploying contracts or re-execute with different params.

For refactoring, I think we have two paths to go. One is to change the debugger to a step-wise style, which does not execute the transaction at once. The other is to use an inspector containing an (address, pc, modification) tuple, and when a modification command is input, the transaction will be re-executed.

Additional context

No response

@publicqi publicqi added T-feature Type: feature T-needs-triage Type: this issue needs to be labelled labels Nov 25, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Nov 25, 2024
@iFrostizz
Copy link
Contributor

Before doing yet another refactor of the debugger, we should probably just support the DAP for good. Related #5784

@zerosnacks
Copy link
Member

Hi @publicqi thanks for your proposal!

Given that the current state of external debuggers is still quite early I feel like it definitely still makes sense to iterate on the current version of the debugger and I'm supportive of your proposal.

If I understand you correctly this is something you would like to contribute? If so, let me know if you have any questions or run into any blockers.

@zerosnacks zerosnacks added A-debugger Area: debugger and removed T-needs-triage Type: this issue needs to be labelled labels Nov 29, 2024
@publicqi
Copy link
Contributor Author

Breaking down into the following tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debugger Area: debugger T-feature Type: feature
Projects
Status: Todo
Development

No branches or pull requests

3 participants