this post was submitted on 05 Jul 2023
14 points (100.0% liked)

C Sharp

1526 readers
5 users here now

A community about the C# programming language

Getting started

Useful resources

IDEs and code editors

Tools

Rules

Related communities

founded 1 year ago
MODERATORS
 

I've been teaching myself C# for the last 2 years or so. I've got a reasonable handle on a lot of the language/ programming in general. However I feel like I'm massively missing the mark when it comes to debugging.

I deal with a lot of multithreaded and real-time applications that interact with physical hardware. I can set breakpoints and inspect variable values at the breakpoint, step into, step over, etc. But the "autos" and "locals" windows are something I don't understand.

Are there any decent courses/resources that teach me some intermediate debugging skills. Particularly interested in resources that focus on Visual Studio tools (extra points for resources that include tips on VS Enterprises debugging tools, like step backwards, etc.).

Appreciate anyone pointing me in the right direction! I've learnt by feel up to this point, but I've hit a wall and could use some structured docs or courses.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 6 points 1 year ago (8 children)

I have earlier shared a conference talk in this community. It may be useful: Advanced .NET debugging - Tess Ferrandez-Norlander - NDC London 2022

It's always good to master the tools you are using. But, in general, you may need to think why you need debugging in the first place. If you find yourself debugging a lot, it may be a symptom of a problem (not enough tests, poorly structured code, etc.).

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (3 children)

Thanks for the link, and I agree with your sentiment. I don't find myself debugging a lot. Perhaps why i neglected the skill. However just today I was getting a null reference exception on a particular line, yet I wasn't able to clarify what object it was that was null. Seems pretty silly, but it prompted me to try and hone my debugging skills, as I felt the tools where there, I just don't know how to use them.

[–] [email protected] 1 points 1 year ago

If you are going to use Visual Studio I would highly recommend getting the resharper plug-in or start using Rider as you IDE. Having good tooling like this will help you see the possible null reference errors before you even finish writing your code.

load more comments (2 replies)
load more comments (6 replies)