I would like debug QGIS plugin using Visual Studio Code. I have Win10 and QGIS 3.4.4. I followed the instructions written in these two sites:

  1. How to setup QGIS 3 and Visual Studio Code plugin development (Windows)
  2. Debug Visual Studio plugin homepage

When I start the debug in visual studio code I have the follow error message:

Exception in thread ptvsd.Server:

Traceback (most recent call last): File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\ptvsd\ipcjson.py", line 269, in process_one_message msg = self.__message.pop(0) IndexError: pop from empty list

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\threading.py", line 917, in _bootstrap_inner self.run() File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\ptvsd\wrapper.py", line 712, in process_messages raise exc File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\ptvsd\wrapper.py", line 697, in process_messages self.process_messages() File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\ptvsd\ipcjson.py", line 258, in process_messages self.process_one_message() File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\ptvsd\ipcjson.py", line 272, in process_one_message self._wait_for_message() File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\ptvsd\ipcjson.py", line 154, in _wait_for_message line = self._buffered_read_line_as_ascii() File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\site-packages\ptvsd\ipcjson.py", line 113, in _buffered_read_line_as_ascii temp = self.__socket.recv(1024) socket.timeout: timed out

A similar error was reported in ptvsd github site, the bug was resolved, but I have already the error. Did anyone have the same issue?

2 Answers 2


I resolved unistalling and reinstalling QGIS 3.4.9 and following the instructions listed before.


There exists a guide for OSX and Windows debugging with VSCode here:

OSX: Debugging QGIS 3.x python plugins on OSX using VS Code

Windows: Debugging QGIS 3.x python plugins on Windows 10 using VS Code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.