- In VSCODE open the folder where your python script is located and then open the python script file from VSCODE Explorer.
- Add the following lines near the top of your script. It is fine to have comments
above
them.
from mi_py_debugger import * pro = attach_debugger()
-
Run the python script (.py) in MapInfo Pro. You will notice a wait cursor denoting that the process in waiting for some debugger to attach to it.
-
Switch to Debug View in VS Code, and select Python: Attach configuration.
-
Start the VS Code debugger using the modified Python Attach configuration. VS Code should stop on your locally-set breakpoints, allowing you to step through the code, examine variables, and perform all other debugging actions. Expressions that you enter in the Debug Console are run on the remote computer as well.
-
Start the VS Code debugger using the modified Python Attach configuration. VS Code should stop on your locally-set breakpoints, allowing you to step through the code, examine variables, and perform all other debugging actions. Expressions that you enter in the Debug Console are run on the remote computer as well.
-
During remote debugging, the debugging toolbar appears. On this toolbar, the disconnect button (Shift+F5 ) stops the debugger and allows the remote program to run to completion.