在 .vscode 中调试时遇到问题 [英] Having problems with debugging in .vscode

查看:77
本文介绍了在 .vscode 中调试时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在 VSCODE 中调试时遇到了一个大问题.我试图通过搜索站点并重新安装我的一些扩展来自行修复它.

I've had a big problem with debugging in VSCODE lately. I have tried to fix it my self by searching the site and reinstalling some of my extensions.

它不会在调试控制台中显示我的结果,而是将以下输出写入我的终端:

Instead of showing my results in the debug console it writes the following output to my terminal:

cd /Users/AVFL/Documents/Programming ; env "PYTHONIOENCODING=UTF-8"
PYTHONUNBUFFERED=1" /usr/local/bin/python3
/Users/AVFL/.vscode/extensions/ms-python.python-2018.3.1/pythonFiles/PythonTools/visualstudio_py_launcher.py
/Users/AVFL/Documents/Programming 54323 34806ad9-833a-4524-8cd6-18ca4aa74f14 RedirectOutput,RedirectOutput
/Users/AVFL/Documents/Programming/Python/Projects/Entrepeneuring/employeeDatabase.py

我的脚本的结果显示在下面.结果也显示在调试控制台中,但我希望它们只显示在那里.

and the results from my script show up below that. The results also show up in the debug console but I would like them to only show up there.

我正在使用 Python:当前文件进行调试.我曾尝试将外部和集成终端功能中的 控制台更改为 none,但我需要将它们设为默认值.

I am debugging with the Python: Current file. I have tried changing the console to none in the external and integrated terminal function, but I need those to be default.

当我使用 Python: Current File 时,如何在调试控制台中调试它?

What can I do to make it debug in the debug console when I use Python: Current File?

我看过一篇关于这个问题的帖子,但他们将控制台更改为无并在 Python 中调试:集成终端而不是当前文件

I've seen one post with this question but they changed the console to none and debug in the Python: Integrated Terminal instead of Current File

在我的文件夹中创建 virtualenv 时出现问题.

The problem occurred when I made a virtualenv in my folder.

推荐答案

我自己找到了答案.我没有更改其他配置以在调试控制台中打印信息,而是创建了一个名为Python:当前文件"的新配置,我将其添加为第一个配置.我在此配置中将控制台设置为无",然后删除了另一个.这解决了我的问题,而无需删除其他易受攻击的设置.

I've found the answer myself. Instead of changing the other configurations to print the info in the debug console I create a new Configuration with the name "Python: Current File" which I added as the fist configuration. I made the console "none" in this configuration and I deleted the other one. This solved my problem with out removing other vulnerable settings.

这篇关于在 .vscode 中调试时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆