Skip to content
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

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

Open
transmissions11 opened this issue Jul 2, 2021 · 16 comments · May be fixed by #832
Open

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

transmissions11 opened this issue Jul 2, 2021 · 16 comments · May be fixed by #832

Comments

@transmissions11
Copy link
Contributor

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

@MrChico
Copy link
Member

MrChico commented Jul 2, 2021

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

@transmissions11
Copy link
Contributor Author

transmissions11 commented Jul 2, 2021

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

Just some sections.

@tcoulter
Copy link

tcoulter commented Jul 26, 2021

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

@MrChico
Copy link
Member

MrChico commented Jul 27, 2021

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

@tcoulter
Copy link

tcoulter commented Jul 29, 2021

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!

@transmissions11
Copy link
Contributor Author

transmissions11 commented Jul 29, 2021

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
Copy link
Contributor Author

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

@MrChico
Copy link
Member

MrChico commented Aug 7, 2021

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

@transmissions11
Copy link
Contributor Author

but we can fix the N and c-n issue

yup, thats what i was hoping for 🙏

@transmissions11
Copy link
Contributor Author

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

@transmissions11
Copy link
Contributor Author

bump hehe

@transmissions11
Copy link
Contributor Author

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

@tcoulter
Copy link

tcoulter commented Oct 6, 2021 via email

@transmissions11
Copy link
Contributor Author

transmissions11 commented Oct 6, 2021

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

@tcoulter
Copy link

tcoulter commented Oct 6, 2021 via email

@d-xo d-xo linked a pull request Oct 7, 2021 that will close this issue
4 tasks
@d-xo
Copy link
Contributor

d-xo commented Oct 7, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants