Actually useful Visual Studio debugging features

willemodendaal
The Curious Coder
Published in
1 min readMay 20, 2016

Visual Studio 2015 can be a big, slow, beast. But when you’ve got enough horsepower to run it properly it has some fantastic features.

I find these features particularly useful when debugging:

  1. Edit-and-continue: this used to be very temperamental in older versions of VS, so I did not use. But recently I’ve found it works nicely and it makes my life easier. Pause application… make changes… Continue execution. No restart and recompilation required!
  2. Breakpoint actions (tracepoints): Tracepoints allow you to add log messages to your code, without having to stop… add log… recompile… restart. It’s a big time saver.
  3. Breakpoints on auto-properties: it used to be difficult to set breakpoints on auto properties, but VS 2015 makes it dead-simple. Just hit F9 on the auto property getter or setter.
  4. Changing the next line of code to execute: this feature has been available for a long time. You can skip code while debugging, or re-execute previous lines of code by simply dragging the yellow current-statement arrow to a new location while debugging.
  5. Getting the return value of a function: sometimes a function ends with a return statement, but does not give you an opportunity to inspect the value (for example, if “return” calls other functions). You can check the value that the function will return by evaluating $ReturnValue1 in the Immediate window or in the Watches window.

--

--

willemodendaal
The Curious Coder

Full stack developer and technology geek; Livin’ the dream!