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

We should think about a way how to make debugging possible #81

Closed
BjoernLudwigPTB opened this issue May 14, 2020 · 6 comments · Fixed by #120
Closed

We should think about a way how to make debugging possible #81

BjoernLudwigPTB opened this issue May 14, 2020 · 6 comments · Fixed by #120
Labels
enhancement New feature or request

Comments

@BjoernLudwigPTB
Copy link
Member

Because of the subprocesses we are spawning, in general debugging does not work as usual. We should think about, if it is possible to make that available. It would strip a lot of print statements from the codes we are seeing being written using the agents and make debugging a lot easier.

@BjoernLudwigPTB BjoernLudwigPTB added the enhancement New feature or request label May 14, 2020
@bangxiangyong
Copy link
Member

yes, i'm wondering how the osbrain guys do it as well..

@BjoernLudwigPTB
Copy link
Member Author

BjoernLudwigPTB commented May 14, 2020

Steps to take then:

  • check how osbrain is doing it
  • ...

@bangxiangyong
Copy link
Member

Apparently the guys at osbrain have not implemented how to attach a debugger yet. The way they handled it is described here: opensistemas-hub/osbrain#360

@BjoernLudwigPTB
Copy link
Member Author

#113 would make this obsolete, right? We should first deal with the considerations regarding the backend change, before we keep thinking about this.

@bangxiangyong
Copy link
Member

i figured one way to do it with pycharm is via 'Attach a debugger to Process' via Ctrl+Shift+A
after the agents are launched, we can attach a debugger to individual agent, and i manage to stop at a breakpoint and inspect the sine genrator agent's loop.

however, since the processes have different names , we may not be able to tell which process belongs to which agent. some exploration is needed for a smoother debugging experience..

@BjoernLudwigPTB
Copy link
Member Author

BjoernLudwigPTB commented Sep 5, 2020

That sounds just like what I imagined. Maybe it would help to record the subprocesses name or id when spawning it.

I originally hoped, that Python built-in pdb would offer this functionality. Several SE threads (e.g. this one) suggest it does not and I could not find anything in its documentation sounding differently. At least if PyCharm and probably other IDEs and debugging tools are able to allow for attaching to a running process, we might want to provide a tutorial how to make use of this.

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

Successfully merging a pull request may close this issue.

2 participants