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

[wip] feat(forge): add buffer dump to debugger #7135

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

emo-eth
Copy link
Contributor

@emo-eth emo-eth commented Feb 15, 2024

Motivation

Since the debugger doesn't allow copy/paste, and buffers can be large, it can be useful to dump buffers to disk for further manual debugging.

Closes #7112

Solution

  • add a dump action w ("write") to the debugger and update help string
  • write to {cwd}/debug/debug_dump_{contract name}_{address}_{timestamp}.json
  • update .gitignoreTemplate to ignore debug/

Thoughts:

  • it might be nice to dump more than just buffers
  • maybe d makes more sense as a key? but w feels more aligned with vim-esque keybindings and writing to disk
  • not sure if there are read/write concerns
  • maybe folder path logic could be more robust to always write to {project root}/debug/x.json

@gakonst
Copy link
Member

gakonst commented Mar 4, 2024

Thanks for all the recent debugger improvements, tagging @klkvr @DaniPopes so they have their eyes on this for review & improvements

@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 31, 2024
@zerosnacks zerosnacks added the T-proof-of-concept Type: proof of concept label Jul 31, 2024
@zerosnacks
Copy link
Member

Possibly superseded by #7375

Would be great to get your feedback on that ticket @emo-eth + possibly extend the feature with the proposed keybinding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-proof-of-concept Type: proof of concept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forge debugger should be able to dump buffers (or even entire state) to disk
3 participants