简体   繁体   中英

How do I stop the Debugpy server and detach the debugger?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM