Attach debugger to pvpython

I need to debug some python scripts run under pvpython process but have no luck in attaching the debugger. Tried to attach through PyCharm and Microsoft VS Code IDEs. Could anyone share some experience on how to debug python scripts launched from pvpython? What is the correct procedure and what are necessary settings to successfully attach the debugger?

You can add a breakpoint in your script with
import pdb; pdb.set_trace()

The python debugger will stop at that point and you continue to use all debugger features from that point on.

1 Like

Added as a Tips & Tricks : How to debug a pvpython script