dapptools icon indicating copy to clipboard operation
dapptools copied to clipboard

Debugger shows `<unknown>:Nothing (?)` while debugging frequently

Open transmissions11 opened this issue 4 years ago • 16 comments

While debugging recently I've noticed that the code panel goes completely blank. Is this normal?

Screen Shot 2021-07-01 at 7 29 06 PM

If you'd like a reproduction case clone this branch, run make, and then run dapp debug and select VaultFactoryTest::test_deploy_vault(). After stepping through the trace for a little bit you will notice the code panel go blank:

https://github.com/rari-Capital/vaults/tree/v1

transmissions11 avatar Jul 02 '21 02:07 transmissions11

is it blank all the time for this contract? Or just in some sections?

MrChico avatar Jul 02 '21 08:07 MrChico

is it blank all the time for this contract? Or just in some sections?

Just some sections.

transmissions11 avatar Jul 02 '21 17:07 transmissions11

I get this a lot as well, sometimes in very large blocks.

Similar reproduction steps:

  1. Clone this repo: https://github.com/tcoulter/sai
  2. Run dapp debug
  3. Choose the test CageTest::testCageExistAfterPeriod() (it happens frequently there, though you'll likely reproduce it with many of these tests)
  4. Press n to step through until you see the same error as the OP.

From my experience, it seems related to contract creation, as it appears to happen a lot during the non-constructor code related to contract creation. This is only a hunch however.

As a feature request, it'd be great if I could step over anything unknown.

Environment:

  • Windows Subsystem for Linux v2 (Ubuntu 20.04.1 LTS)
  • dapp 0.33.0
  • solc, the solidity compiler commandline interface
  • Version: 0.8.6+commit.11564f7e.Linux.g++
  • hevm 0.47.0

tcoulter avatar Jul 26 '21 21:07 tcoulter

As a feature request, it'd be great if I could step over anything unknown.

you can step to the next piece of source code with shift-N, or step forward through the bytecode without entering subcalls with control-n

MrChico avatar Jul 27 '21 10:07 MrChico

In the case above, I do use shift-N. When it reaches anything unknown, it steps through the instructions as if I was just pressing N alone.

Edit: I guess I didn't specify that above. Perhaps that's a bug!

tcoulter avatar Jul 29 '21 17:07 tcoulter

In the case above, I do use shift-N. When it reaches anything unknown, it steps through the instructions as if I was just pressing N alone.

Edit: I guess I didn't specify that above. Perhaps that's a bug!

yup same. should have specified as well oop 😅

doesn't feel good to be stepping thru things smoothly with N and then hit a 2 second patch of abyss

transmissions11 avatar Jul 29 '21 19:07 transmissions11

@MrChico @d-xo bumping because running into this while debugging some complex tests rn and its slowing me down quite a bit heh

transmissions11 avatar Aug 07 '21 08:08 transmissions11

Not sure we can do much about the fact that srccode is missing for parts of the code, but we can fix the N and c-n issue

MrChico avatar Aug 07 '21 08:08 MrChico

but we can fix the N and c-n issue

yup, thats what i was hoping for 🙏

transmissions11 avatar Aug 07 '21 08:08 transmissions11

btw i dont see this issue with c-n, but i do sometimes see with c-p

transmissions11 avatar Aug 07 '21 08:08 transmissions11

bump hehe

transmissions11 avatar Sep 05 '21 04:09 transmissions11

Screen Shot 2021-10-05 at 9 12 20 PM

transmissions11 avatar Oct 06 '21 04:10 transmissions11

I’ve been switching tools like Leo switches girlfriends (between multiple projects, mind you), so haven’t gotten back to my dapptools project yet. Once I do I’ll let you know!

On Tue, Oct 5, 2021 at 9:12 PM t11s @.***> wrote:

[image: Screen Shot 2021-10-05 at 9 12 20 PM] https://user-images.githubusercontent.com/26209401/136139567-0d937786-0ae8-47c8-bf21-bbe0ace00ef4.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dapphub/dapptools/issues/686#issuecomment-935403673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAWTVPSTRSKVVFGOSOKW7DUFPEEJANCNFSM47V2SM4Q .

tcoulter avatar Oct 06 '21 05:10 tcoulter

hehe i just want the debugger to skip the Nothing (?) screens when stepping thru with shift + N/shift + P

transmissions11 avatar Oct 06 '21 05:10 transmissions11

Oops, me too! I somehow thought you were the maintainer looking for more info (I responded via email, so my bad!).

On Tue, Oct 5, 2021 at 10:16 PM t11s @.***> wrote:

hehe i just want the debugger to skip the Nothing (?) screens when stepping thru with shift + N

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dapphub/dapptools/issues/686#issuecomment-935476556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAWTVOF3HCUGRV5RUFWFCDUFPLR5ANCNFSM47V2SM4Q .

tcoulter avatar Oct 06 '21 05:10 tcoulter

@transmissions11 had been kinda avoiding this one since the source map parser and format are quite mysterious to me :see_no_evil:, think I have a fix, would be great if you could test it out.

d-xo avatar Oct 07 '21 19:10 d-xo