简体   繁体   English

Visual Studio Code python调试错误PyQt5

[英]Visual Studio Code python debug error PyQt5

Since I've updated VS code it seems to have broken my debugger. 自从我更新了VS代码以来,似乎已经破坏了我的调试器。 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. 现在,当我尝试使用pyqt调试python脚本时收到此错误。 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. 这是我在vs代码上的调试菜单中单击运行时在终端上的输出。

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!? 发生了什么!?

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). 我面对的问题是通过在环境变量下的path变量中添加C:\\ Windows \\ System32来解决的(在同一位置为python添加路径)。

Mark useful if it helps. 如果有帮助,请标记为有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM