> ptvsd.enable_attach( address = ( 'localhost', 5678 ) ) Type "help", "copyright", "credits" or "license" for more information. If i directly execute the only one command from debugvs code from Qgis python37 i get an error :Ĭ:\PROGRA~1\QGIS 3.10\apps\Python37>python.exe.Click the debugvs button ang i get this error : I open QGIS and activate Cadastre plugin.Open this plugin folder with VS Code (right click + open with code)Ĭreate new debug launch.json file like that :
Install ptvsd from Qgis 3.10 python env :Ĭ:\PROGRA~1\QGIS 3.10\apps\Python37>pip install ptvsd=4.1.4Ĭ:\Users\my_user\Documents\git\QgisCadastrePlugin\cadastre QgsMessageLog.logMessage(repr(format_exception), MESSAGE_CATEGORY, Qgis.Critical) QgsMessageLog.logMessage("Attached remote Debug for Visual Studio", MESSAGE_CATEGORY, Qgis.Info)Įxc_type, exc_value, exc_traceback = sys.exc_info()įormat_exception = traceback.format_exception(exc_type, exc_value, exc_traceback) Ptvsd.enable_attach(address=('localhost', 5678))
QgsMessageLog.logMessage("Remote Debug for Visual Studio is already active", MESSAGE_CATEGORY, Qgis.Info) the version of ptvsd used).įrom re import QgsMessageLog, Qgis Instead of using the third-party Qgis plugin Enable Debug for Visual Studio it is also possible to attach the debugger in your own plugin (so you have more control over e.g. Now your debugger should be attached to QGIS. In VSCode select Python: Remote Attach option in the debug configurations drop down and click the "play" button next to it. Open QGIS and activate TimeManager plugin. Click the cogwheel next to the configurations drop down and edit the pathMappings like described above. You need to change the pathMappings in the configuration manually. Now VSCode should have a Python: Remote Attach option in the debug configurations drop down. Then VSCode shows a Select a debug configuration dropdown where you select Remote Attach. When VSCode Asks for an Environment select Python. I have not found a way to select the interpreter used in QGIS, so I just select a generic python3 interpreter. This could for instance be /Users/asger/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/timemanager The majority of Google developers are using it now, Chris Capossela, Microsoft’s chief marketing officer, said on the Windows Weekly podcast.
It is compatible with Windows, Linux and Mac OS X. Not the ones prior to it.I open the plugin code directory. The open-source VSCode is a code editor redefined and optimized for building and debugging applications. In another forum I learnt that 3.9.1 is the python supported for Monterey. Make: *** No targets specified and no makefile found.
noĬonfigure: error: Unexpected output of 'arch' on OSX noĬhecking whether pthread_key_t is compatible with int. Results logged to /var/folders/3f/l881d_r17qj_2q0kt5_6ll9h0000gn/T/Ĭhecking whether to enable large file support. However, when I used brew install for all packages including pyenv, pyenv-virtualenv - I was able to have multiple python virtual environments on 2.7.18, 3.9.9 on latest Monterey using M1 silicon 14" pro.įor default Python 3.8.9, I am seeing build errors for pyenv install 3.8.9 command: pyenv install 3.8.9īUILD FAILED (OS X 12.0.1 using python-build 20180424)
An update on /intro-to-pyenv/ I had issues with pyenchant not being able to find enchant C library when I used pyenv installer as suggested in this link.