I'm new to Python, but have experience with VSCode. I'm trying to debug a Python plugin running on a PyGTK-based application using VSCode, but I suspect my configuration is incorrect.
I can attach the debugger to the application and hit breakpoints in the plugin's code, but it's out of sync. It doesn't step on the correct line of the source code and the error messages report the wrong line numbers.
Pylance also complains about missing libraries belonging to the application. While my environment is aware of the standard python modules, it is unaware of the application's internal one. I'm not sure how I would go about resolving it. I did create a pyvenv.cfg in VSCode:
home = /usr/local/opt/python@3.10/bin
include-system-site-packages = false
version = 3.10.8
Here's the Python info I executed from the App's Python REPL window:
>>> import sys
>>> print (sys.version)
3.10.2 (main, Sep 4 2022, 13:22:00) [Clang 13.1.6 (clang-1316.0.21.2.5)]
>>> print (sys.version_info)
sys.version_info(major=3, minor=10, micro=2, releaselevel='final', serial=0)
print(sys.executable)
/Users/phalen/Applications/GNATStudio.app/Contents/MacOS/gnatstudio
My code isn't using the same interpreter, nor the same version. How do I resolve these issues?