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

(feat) add conditional breakpoints #4801

Merged
merged 9 commits into from
Apr 26, 2023

Conversation

iFrostizz
Copy link
Contributor

Motivation

Implementing @mds1 's ideas about extending breakpoints, ref: #4679 (comment)

Changes

  1. Add conditional breakpoints (vm.breakpoint("a", true) to switch on and vm.breakpoint("a", false) to switch off)
  2. Write the ['<char>]: goto breakpoint notice on debugger footer

About the notice

It's getting somewhat big and I cannot see the whole footer (about 2/3 currently) at once. Why not adding a h to toggle help that would take more space, but could be collapsable ?

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm,

needs nightly fmt

Why not adding a h to toggle help that would take more space, but could be collapsable ?

I guess that makes sense

@mattsse mattsse added A-cheatcodes Area: cheatcodes A-debugger Area: debugger labels Apr 22, 2023
@mattsse
Copy link
Member

mattsse commented Apr 22, 2023

sgtm!

@iFrostizz
Copy link
Contributor Author

Wanted to do smth similar to vim-which-key help modal that would pop up over the debugger using contexts, but that was doing some underflow and not sure why. So it's resizing the main window to leave some space for the help footer and collapse on h press, is it good enough?

iFrostizz and others added 3 commits April 22, 2023 12:55
* fmt: abigens

* Pass by reference when patching Hardhat selector

rebase master
@iFrostizz iFrostizz requested a review from mattsse April 22, 2023 11:08
@iFrostizz
Copy link
Contributor Author

Seems like the conflicts doesn't resolve after a rebase

@iFrostizz
Copy link
Contributor Author

@mattsse seems to be good now!

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, ty

@mattsse mattsse merged commit f05fdd8 into foundry-rs:master Apr 26, 2023
@iFrostizz
Copy link
Contributor Author

@mattsse there have been a conflict fail, which is why you had to put the trailing "_" to make clippy happy here: https://github.com/iFrostizz/foundry/blob/556e0b4580f92a7f4f079d536416f33c695faae4/ui/src/lib.rs#L369-L382
I had broken down the two help lines to make it more readable, because it's wrapping currently (plus lacking of the h key binding text)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cheatcodes Area: cheatcodes A-debugger Area: debugger
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants