Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

You don't have an extension for debugging C#, Should we find a C# extension in the Marketplace?

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

Error message while trying to debug

But I do have the C# extension installed in VSCode

C# Extension on Marketplace

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

I also have Dotnet installed on my machine

dotnet --version
5.0.203

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?

like image 552
Vishnu Avatar asked May 25 '21 12:05

Vishnu


People also ask

How do I get C to work on VS Code?

We need to click on the extension button that displays a sidebar for downloading and installing the C/C++ extension in the visual studio code. In the sidebar, type C Extension. In this image, click on the Install button to install the C/C++ extension.

Can you Debug C in Visual Studio?

Visual Studio Code supports the following debuggers for C/C++ depending on the operating system you are using: Linux: GDB. macOS: LLDB or GDB. Windows: the Visual Studio Windows Debugger or GDB (using Cygwin or MinGW)

What is debugger C++?

Debugging is a methodical process of finding and reducing the number of bugs (or defects) in a computer program, thus making it behave as originally expected. There are two main types of errors that need debugging: ▶ Compile-time: These occur due to misuse of language constructs, such as syntax errors.

Is there an extension for debugging Csharp?

"You don't have an extension for debugging csharp". I double-checked everything even tried to install the lower c# extension version but the issue is still there. The extension is still enabled and doesn't even require reloading.

Does Visual Studio Code support C/C++ debugging?

Visual Studio Code supports the following debuggers for C/C++ depending on the operating system you are using: Linux: GDB; macOS: LLDB or GDB; Windows: the Visual Studio Windows Debugger or GDB (using Cygwin or MinGW) Windows debugging with GDB. You can debug Windows applications created using Cygwin or MinGW by using VS Code.

How to debug other languages in Visual Studio Code?

For debugging other languages and runtimes (including PHP, Ruby, Go, C#, Python, C++, Powershell and many others), look for Debuggers extensions in our VS Code Marketplace or select Install Additional Debuggers in the top-level Debug menu. Below are several popular extensions which include debugging support:

Do I need a launch configuration file for debugging?

However, for most debugging scenarios, creating a launch configuration file is beneficial because it allows you to configure and save debugging setup details. VS Code keeps debugging configuration information in a launch.json file located in a .vscode folder in your workspace (project root folder) or in your user settings or workspace settings .


Video Answer


1 Answers

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",
like image 193
Techy Shadow Avatar answered Oct 13 '22 03:10

Techy Shadow