如何解决为什么VSCode调试器不能与C#中的默认launch.json设置一起使用?
调试根本不起作用。从外部终端运行“ dotnet run”时,该应用程序可以正常运行(构建并正常运行)。但是,当转到“活动栏”中的“运行”选项卡并启动“ .NET Core启动(控制台)”选项时,什么也没发生。它根本不运行程序。就像它陷入无限循环一样。没有断点命中,甚至没有执行Main方法(已通过我的应用程序和“ Hello World”示例进行了测试)。我尝试将launch.json中的“控制台”更改为“ integratedTerminal”,“ externalTerminal”和“ internalConsole”。没有工作。 “ ExternalTerminal”比其他的更远,但仍然没有显示。没有显示打印语句,没有光标移动,没有动作。只是挂,什么也没有。使用此选项,当我从vscode本身停止调试器时,它会打印“单击任意键以继续...”。最后,我尝试使用“ .NET Core Attach”,但也没有成功。我需要调试应用程序,因为它对我的工作至关重要。请,我可以使用一些帮助。以前没有这个问题。
注意:
I) I haven't tested with other languages
II) Creating a new project and debugging it doesn't fix the issue. It still persists with default debug settings and default launch.json file.
III) When using "console": "externalTerminal" in launch.json,the settings option "Terminal › External: Linux Exec" is set to "konsole". Tried with "gnome-terminal",but no success.
我的配置:
VSCode Version: 1.47.3
OS Version: Arch Linux (fully updated; date: 12 AUG 2020)
DE: KDE V.5.73.0
Terminal: Konsole
复制步骤:
I) Open VSCode(either from "Application" or with "code ." in terminal)
II) Promts you for assets for debugging and such,to which you answer "Yes"
III) Go to "Run" section to debug
IV) Debug using ".NET Core Launch (console)"
解决方法
发布此文章时,Arch Linux软件包已损坏。从Microsoft网站下载官方软件包即可解决此问题。最好使用官方办公室
,在您的 launch.json 中使用它
"console": "integratedTerminal"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。