Choose Tools ▸ GISDK Developer's Toolkit ▸ Register Embedded Python… and pick
the desired Python distribution.
In Immediate Execution, run SetEmbeddedPythonSourceFolder("C:\\Projects\\MyScripts")
and then StartEmbeddedPythonDebugger(). VS Code comes up on that folder and
attaches by itself.
Set breakpoints in the .py file.
Run the script. A script is compiled once, at its first run, so the debugger
has to be started before the script is imported. A script that has already run
needs importing again.
StopEmbeddedPythonDebugger() closes the port and ends the session. A later
StartEmbeddedPythonDebugger() opens a new one, and breakpoints in scripts that
were already compiled bind again without importing them.
GetEmbeddedPythonDebuggerStatus() returns a multi-line report of what is in
place and what is not, including the filename each script was compiled under.
Read it when a breakpoint does not stop.