Thursday, June 16, 2016

Latest C++ Debugging Tips and Tricks

https://channel9.msdn.com/Shows/Visual-Studio-Toolbox/C-Plus-Plus-Debugging-Tips-and-Tricks

As of VS2015 C++ or earlier for some features:

TLDR:

  • "Auto Window" during debugging shows the results of all functions that were executed in a line that was stepped over.

So if you have a line like that:
int result = function1()->function2()->function3();

When you step over such line, VS debugger will show the result of each functionX() calls above. Thus, you don't have to guess what were the individual results.

  • Under exceptions debug window, you can search for a specific exception type (std::exception)
  • You can set a debug breakpoint with a condition.


  • CTRL-Q for quick launching windows of VS, such memory window, parallel watch, etc.
  • "Show threads in source" shows where in the source the threads are. Useful when multiple threads are running on the same code file.
  • Integrated memory profiling can take snapshots and then compare the two and show where the extra allocation(s) came from

No comments:

Post a Comment