consensus-specs icon indicating copy to clipboard operation
consensus-specs copied to clipboard

Debugger capability in tests

Open adiasg opened this issue 4 years ago • 2 comments

Currently we don't have a way to attach a Python debugger while running tests. This removes the possibility to use IDE debuggers for easier/faster identification of bugs.

Is it possible to attach a debugger in our current testing setup? If not, what changes are necessary?

adiasg avatar Nov 16 '21 16:11 adiasg

do you have a specific debugging environment that you use? does it fail and can you provide more info on how it fails?

ralexstokes avatar Nov 17 '21 13:11 ralexstokes

I'm using the standard VSCode Python debugging environment. When I run a test file with the debugger attached, it fails when importing eth2spec with a ModuleNotFoundError.

I tried to recreate the situation like this:

  1. Install eth2spec using make install_test.
  2. Ensure that eth2spec module is installed by checking pip list.
  3. Run python and check if import eth2spec works.

Step 3 fails with the same ModuleNotFoundError.

What's the correct way to import eth2spec?

adiasg avatar Nov 17 '21 16:11 adiasg