How to debugg a spacy weasel project executed from the terminal using VSCODE o Pycharm?. Process don't get attached

21 views Asked by At

my very best wishes to all of you. This is the problem: I have cloned and ran a spacy project from its repository, using the commands below:

python -m weasel clone tutorials/rel_component python -m weasel run all

The project runs well. What I want is to run it step by step in order to study its inner details. I have tried in pycharm to debug the weasel module, but it isn't working well: I cannot get into any breakpoints in any of the project's scripts, for instance, scripts/parse_data.py. However, I can get into any breakpoint setted in the script test_project_rel.py.

I have tried this:

  1. In Pycharm I go to "Run>Edit configurations", and choose to run the module weasel with the parameters "run all". I have included the option "-Xfrozen_modules=off" for the interpreter, in order to get access to scripts out of the weasel module. Then I started a debugging session.

Output: The debugging runs well but as I said, it is not possible to get access to any breakpoint in a script out of the test_project_rel.py or the run.py script, from the weasel module.

  1. I run the command "python -m weasel run all" from the terminal and then I try to attach the debugger to its process, using the option "Attach from a process". I used an input("...") instruction in the script run.py, from the weasel module, to stop the process, and then I attached the debugger to it.

Output: The process looks like it is attached but never activates the options to proceed with a normal debugging.

  1. In VSCode I tried the procedure named "Local script debugging" available in: https://code.visualstudio.com/docs/python/debugging#_python-debugger-extension.

Output: same as in 2.

0

There are 0 answers