您没有用于调试 C# 的扩展,我们应该在 Marketplace 中找到 C# 扩展吗? [英] You don't have an extension for debugging C#, Should we find a C# extension in the Marketplace?

查看:49
本文介绍了您没有用于调试 C# 的扩展,我们应该在 Marketplace 中找到 C# 扩展吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 VSCode 调试 C# 脚本.但是当我按 F5 时它显示

I'm trying to debug a C# script using VSCode. but when I hit F5 it shows

但我确实在 VSCode 中安装了 C# 扩展

But I do have the C# extension installed in VSCode

关于我的 VSCode

About my VSCode

Version: 1.56.2 (system setup)
Commit: 054a9295330880ed74ceaedda236253b4f39a335
Date: 2021-05-12T17:13:13.157Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Windows_NT x64 10.0.19042

我的机器上也安装了 Dotnet

I also have Dotnet installed on my machine

dotnet --version
5.0.203

以前,VSCode 用于解决所有必要的依赖项并创建调试 C# 脚本所需的文件.也许最新的更新有一些问题?

Previously, VSCode used to resolve all the necessary dependencies and create the necessary files for debugging a C# script. Maybe the latest update has some issues?

推荐答案

如果您有问题,我建议您转到查看"然后按命令托盘或按 Ctrl+Shift+P 然后搜索为构建和调试生成资产",如果您希望它打开一个新窗口并执行您的代码而不是在终端中运行:打开.vscode然后选择launch.json,然后转到显示控制台的地方并改写:

If you have issues with that I suggest going to 'view' and then press command pallet or press Ctrl+Shift+P and then search 'generate assets for build and debug' and if you want it to open up a new window and execute your code instead of it running in the terminal: Go open .vscode Then select launch.json and then go to where it says console and write this instead:

"console": "externalTerminal",

这篇关于您没有用于调试 C# 的扩展,我们应该在 Marketplace 中找到 C# 扩展吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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