opensistemas-hub / osbrain

osBrain - A general-purpose multi-agent system module written in Python
https://osbrain.readthedocs.io/en/stable/
Apache License 2.0
175 stars 43 forks source link

How to debug an Agent process #360

Open bangxiangyong opened 4 years ago

bangxiangyong commented 4 years ago

Is there a way to attach a debugger to an agent? e.g putting breakpoints and stepping through the functions being called.

Or, what is the recommended way to debug the agent?

Peque commented 4 years ago

@bangxiangyong It should be possible. Once I had a look at "remote debugging" tools in Python and there seemed to exist. Basically what you need is a tool to debug other processes.

Currently that is not integrated, but I would be glad to integrate the necessary changes if you find out a good way to do it. Please keep this issue updated with your discoveries! :smile:

In a multi-agent system that may not be that useful, since only one agent will be stopped. You can currently debug "manually" by using a proxy to a running agent, or by creating test, which is the best way to ensure proper behavior of your agents. :stuck_out_tongue_winking_eye: