This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Fix error message on hitting v
in debugger with no tx loaded
#5694
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.
Once again, the CLI debugger was erroring if you hit
v
with no transaction loaded. The problem comes from thedata.current.identifiers.sections
selector; this would error if no transaction was loaded. So basically I added the appropriate guards to allow it to return something in this case; I'll skip going into detail because frankly it's nothing interesting.Don't be scared by what looks like a gigantic change to complicated code on lines 684 to 767; the only difference is that the whole thing is now within a big
scopes && inlined ? oldStuff : null
. None of the complicated parts were altered at all! Most of those lines just had their indentation changed! I guess you can turn off whitespace changes to make this more evident.I didn't add any tests, but this is easy enough to test manually; go into a Truffle project, start up ganache, and do
truffle debug
and thenv
. Hopefully you didn't see an error message!Alternative I could have just fixed this on the CLI side by not asking for that selector in this case, but, IDK, I liked this approach. 🤷
Also, while I was at it, I removed a use of the obsolete
indicateUnknown
option.