-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(forge): debugger should load sourcemaps by file_id #7058
Conversation
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.
hyped for this
e5edb08
to
40d197b
Compare
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.
Needs cargo +nightly fmt
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.
LGTM, thanks! Pending @onbjerg
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.
ty!
lgtm
Motivation
Summary from #7043:
Solution
ContractSources
now also maintains a mapping offile_id/index -> (source code, bytecode)
. When the loadedfile_id
does not matchsource_element.index
, it looks up the contract source using thesource_element
'sindex
.I could use some help testing this – it looks to me like the
debug.rs
test doesn't actually make any assertions, so I don't have much to go off of.Closes #7043
Before:
After: