I'm trying to debug a C# script using VSCode. but when I hit F5 it shows
But I do have the C# extension installed in 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
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?
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.
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)
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.
"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.
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.
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:
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 .
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",
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With