Reputation: 2906
I am using Debugpy to run a debug server from the Blender Python scripting environment, and I have successfully attached and debugged with VS Code. However, I cannot figure out a way to break the connection and shut down the debug server from within Blender where I called it.
I can disconnect from the VS Code side by pressing the disconnect button. I would like to add an operator in Blender that will allow me to kill the connection from there though.
Nominally, it would look something like debugpy.disconnect
, but that doesn't seem to be an option in the Debugpy API documentation. How can I accomplish this?
Upvotes: 4
Views: 1319
Reputation: 11
I had a similar issue, and found that this worked:
import pydevd
pydevd.stoptrace()
It's a shame its not accessible via the public api.
Upvotes: 1