Copy link to clipboard
Copied
Hi guys.
Does anybody have a reliable recipe for attaching the Visual Code debugger to a Painter Python plugin? I've tried a couple of ways, but I've had no luck so far.
Copy link to clipboard
Copied
I have it working using debugpy and visual studio code, so should be possible to use VS to attach.
# debugpy errors out if you don't set os.__file__:
import os
import inspect
os.__file__ = inspect.getfile(lambda: None)
import debugpy
# The python exe must be the same python version that Painter uses:
debugpy.configure(python="path/to/standalone/python.exe")
debugpy.listen(<portnumber>)