Debugging Tools for C#

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Finding errors and bugs in your code is one of the most frustrating aspects of being a developer. Sometimes it feels like you spend more time trying to fix code than write it, especially for new to mid-level developers. Fortunately, there are tools available that can help you track down issues and debug your code, saving programmers and development teams time and headaches.

We will be looking at some of the best code debugging tools for C# in 2021 in today’s article. Options include Integrated Development Environments (IDEs) or code editors, and some are simply code debuggers. However, before we go any further, a quick note: the developer tools listed below are not in any particular order; they are all effective software that can help you fix errors in your applications.

Types of Code Debugging Tools for C# and .Net

There are many tools that can assist a developer in finding bugs and errors in their code. Some typical types of bugs a programmer might encounter include:

  • Crashes
  • Hangs or lagging
  • Memory errors
  • Failed server requests
  • Logic bugs
  • Caching issues
  • Network lag
  • Performance issues

To fix these types of bugs, whether you are debugging code in development or production, a coder might employ any number of code debugging tools, including:

  • Decompilers
  • Application Performance monitors
  • Event viewers
  • Dump files
  • Debuggers
  • Code refactoring tools
  • Memory profilers
  • Performance profilers
  • Error and bug monitoring tools

Code Debuggers for C# and .Net

Here are our picks for the top code debugging tools for C#, .Net, and other Microsoft-related programming languages.

Microsoft Visual Studio for Code Debugging

When developers think of Visual Studio from Microsoft, it is usually as an integrated development environment or IDE. That is with good reason, as Visual Studio is probably the most popular code editor for developers, regardless of programming language. It is a powerful tool for software development that can become even more powerful thanks to third-party extensions available via places such as the Visual Studio Marketplace. Covering the majority of popular programming languages, including JavaScript, C#, Python, and Java – the IDE also has a robust code debugger built-in, not to mention the many extensions for code debugging that you can install.

C# Visual Studio Code Debugging Tool

Microsoft Visual Studio includes the following features and benefits for debugging C# and .Net code:

  • Interactive debugging tools
  • Performance profiler
  • Cloud debugger via Cloud Explorer
  • Memory profiler
  • IntelliTrace debugging
  • Exception options and tooltips
  • Graphic and shaders debugger for video game developers
  • Step-through code and set breakpoints
  • Debugging tools built into the IDE, giving you a full software development suite of tools in one spot

How Much Does Visual Studio Cost?

You may be asking how much does Visual Studio costs? There are several different options for purchasing the Visual Studio IDE and code debugger.

  • For starters, it is included in some versions of Microsoft Office 365.
  • For individuals, the full-featured Visual Studio Community is available for free on PC and Mac.
  • For businesses with five or more developers, subscriptions start at $45 per month for Professional and $250 per month for Enterprise.
  • For Enterprise, visit Visual Studio Enterprise Pricing

Visual Studio Code for Code Debugging in C# and .Net

Not to be confused with Visual Studio, Visual Studio Code is Microsoft’s Open-Source IDE. Just about as popular as its big brother, VS Code is also a powerful code editor with built-in code debugging tools as well. The IDE supports a wide breadth of programming languages and is much beloved amongst the software development community – and with good reason. First of all, it has a great price point (it is free) and, like Visual Studio, VS Code is highly extensible thanks to a large number of add-ons and extensions available in the Visual Marketplace.

C# and .Net Code Debuggers

Microsoft Visual Studio Code includes the following features and benefits for debugging C# and .Net code:

  • Third-party and Microsoft-produced code debugging extensions and add-ons available from the Visual Studio Marketplace. This includes debuggers for Python, C, C++, C#, and Java, to name but a few.
  • Built-in debugging for Node.js runtime. This means you can debug JavaScript, TypeScript, and other languages that are transpiled to JavaScript.
  • Built-in refactoring tools, straight in the IDE and development environment.
  • Breakpoints, Logpoints, and data inspection.
  • Built-in Debug Console REPL (Read-Eval-Print-Loop).
  • Multi-target debugging and remote debugging support.

Sentry C# Debugger

Created by Functional Software, the Sentry Error and Performance Monitoring tool is used by some of the biggest companies in the world, including names like GitHub, Disney, Reddit, and even Microsoft. Along with their error tracking software for C#, the company’s products also monitor applications created in many other languages, including Python, JavaScript, Go, iOS, Android, and Ruby. Frameworks such as React, Angular, Django, Swift, and Flask are also covered – to name a few.

C# Code Debugger Sentry

Sentry includes the following features and benefits for debugging C# and .Net code:

  • Overhead view of C# stack traces, including line numbers and filenames.
  • Filter and group C# exceptions.
  • Monitor errors in production without causing performance issues in throughput.
  • Track and surface performance problems in API and surface errors to prevent downtime.
  • Exception handling tools, including debug logs, database queries, and network requests.
  • Find bugs in different versions of software to track origin points.

How Much Does Sentry C# Code Debugger Cost?

If you are wondering how much the Sentry C# Code debugging tool costs, you can check out Sentry Pricing. A limited version for developers is free. Meanwhile, the Team version is $26 a month and the Business level weighs in at $80 per month. An Enterprise version is also available, but you would have to request a quote to see pricing.

dotPeek and dotTrace from Jet Brains

While these are two different tools for debugging code, dotPeek – which is technically a decompiler – and dotTrace – a performance profiler – we include these two together because they are both made by one of the greatest developer tool creators in the game, JetBrains. You will find JetBrains mentioned in a lot of my articles, and with good reason. They make some of the best software developer tools on the planet. You might recognize their name from products such as ReSharper, Rider, PyCharm, and the Java-replacement language for mobile app development, Kotlin.

dotPeek dotTrace C# Code Debugging Tools

dotPeek includes the following features and benefits for debugging C# and .Net code:

  • Based on ReSharper’s decompiler, which makes it capable of decompiling any .Net assembly into C# or IL code.
  • Supports .dll, .exe, and .winmdfiles.
  • Export decompiled code into Visual Studio projects.
  • Debug third-party code from local source code based on PDB files or from source servers.
  • Debug assembly code thanks to dotPeek’s ability to create symbol servers, which allows Visual Studio to debug third-party code.

dotTrace includes the following features and benefits for debugging C# and .Net code:

  • Records and analyzes application performance.
  • View the time each call method, HTTP request, and database call takes to better identify performance issues.
  • Incorporates with Visual Studio so you can profile apps in the IDE or development environment.
  • Profile timelines, SQL, static methods, and any asynchronous code.

How Much Does dotPeek and dotTrace Cost?

If you are wondering how much dotPeek and dotTrace costs, you can visit the JetBrains website for a full breakdown. In essence, dotPeek is free on its own, or you can get it as part of the dotUltimate developer tool kit.

.Net Memory Profiling Debugger

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read