Closed eggplantzzz closed 1 year ago
When I attempt to debug this using the CLI debugger I get a message saying "location is past end of source, displaying end". See the image below.
Hm, looks like a bad source map. Not sure there's much we can do about that, other than file an issue with Solidity. (Well -- in the visual debugger I guess we can improve how we handle this error case, but we can't, like, make it correct.)
Actually, in truth we have filed an issue with Solidity, namely, this one: https://github.com/ethereum/solidity/issues/12915
So, you could comment on that issue to add this example.
The nasty thing is that when this came up previously we weren't able to find a good reproduction example. We could reproduce it, yes, but we couldn't find any way to simplify the reproduction to make it manageable. So, yeah. :-/ Still, likely you should let them know about this anyway, so they know it's come up a second time!
On visual-debug
, there is a bit of a hacky "workaround" now implemented. For now, if we get a null
value for the end of the source range, we'll currently just assume it is to the end of the source.
Debug tx 0x1004a927d96191a309e080b24d3b80e642974d378bd642269a31d993f59815cc on mainnet and you'll se that when it loads, the code is not correctly highlighted.