Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, so in order to launch the debugger you'd need to run
forge debug --debug?this does not sound right to me
I think the only reason --debug is even available is because we reused a common type that has this.
wdyt @iFrostizz ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes sense, but not sure about
forge debugutility, why don't we just useforge script --debugfor the same purpose ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that
forge debug --debugis a bit odd, but since that's exactly what the documentation (forge help) says and it took a trivial change to make it so, I rolled with it. I'd be happy to change the docs and/or behavior though if there's consensus on something more sensible.All I was looking for was the ability to run my contract function and get a trace. I used
forge debugbecause the docs made that sound correct, and I didn't tryforge scriptbecause it sounded like that was more about building transactions to run on chain, but having just tried it,forge scriptworked fine for me too.Any thoughts on the following (mutually exclusive) options? :
--debugflag fromforge debugand documentation, and potentially add a--traceflag instead which turns off the debugger and just prints a trace. This would leave the default behavior unchanged.forge debugaltogether and make it clear thatforge scriptis the right thing to use in this case. This seems a bit clearer, but may break people's existing infrastructure.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forge scriptshould be enough because it's kind of a superset offorge debugso I would be on the side of nuking it, good suggestionsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that, I'd be in favor of nuking
forge debugas well, just to simplify the interface. I'll defer to you folks who know the project better, but If you'd like me to make either of these changes happen, let me know and I'll see what I can do.