0

Since I've updated VS code it seems to have broken my debugger. For a while I kept getting a Debug adapter process has terminated unexpectedly error. Can't even remember how I got past that.

Now I get this error when trying to debug a python script using pyqt. This all worked a few months ago.

C:\Workspace\pyqt_tutorial>cd c:\Workspace\pyqt_tutorial && cmd /C "set "PYTHONIOENCODING=UTF-8" && set "PYTHONUNBUFFERED=1" && C:\Python34\python.exe C:\Users\Peter\.vscode\extensions\ms-python.python-2018.4.0\pythonFiles\PythonTools\visualstudio_py_launcher.py c:\Workspace\pyqt_tutorial 53792 34806ad9-833a-4524-8cd6-18ca4aa74f14 RedirectOutput,RedirectOutput c:\Workspace\pyqt_tutorial\main.py "

'cmd' is not recognized as an internal or external command, operable program or batch file.

This is the output on the terminal when I click run in the debug menu on vs code.

Also my breakpoints don't work unless I put a delay in the 1st line of each script, debugger takes almost a minute to get to the first line... It was so smooth before. What happened!?

1
  • There was a time where I could download vs code, install an extension, and be writing and debugging scripts in minutes. Time to jump ship yet? Commented May 4, 2018 at 22:22

1 Answer 1

1

I was facing the same thing which got fixed by adding C:\Windows\System32 in the path variable under environmental variables(same place where we add path for python).

Mark useful if it helps.

Sign up to request clarification or add additional context in comments.

3 Comments

This cleared up the error. I marked useful but it won't publicly display...Any idea why it is so slow and doesn't stop at breakpoints unless I put a delay before the breakpoint? Or why it seriously takes sometimes almost 30 seconds to start the debugger, and 10 seconds to step over anything? I'm noticing this on 2 machines at work. :(
This might be tricky. It could be related to VS Code, your python code or the machine on which VS Code is running. I am sure you must have tried to reinstall the VS Code and Python plugin. While debugging, does the whole program goes unresponsive when you face delay? What do you see in the call stack/watch when the debugging is unresponsive,anything out of ordinary? In your code, are you using some globally declared which might have to fetch some token/authentication over internet or something( too far fetched but I faced something similar).
I'll check through some of this tomorrow when I'm there. Thanks for all of your help!

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.