Category Archives: Debugging

Data Read Breakpoints – redux

The Problem ~5Y ago I blogged about data breakpoints. A hefty bit of the discussion was devoted to persistence of hardware breakpoints across a thread switch: all four implementations mentioned assume that HW breakpoints persist across thread boundaries, and some rough … Continue reading

Posted in Debugging, Visual Studio | Leave a comment

Tinkering with VS2015 (CTP 6)

Today I downloaded the latest VS bits and played around with the native debugger. It was a brief session and so would be the records of my impressions. J Universal CRT is here! And seems like a great idea. A … Continue reading

Posted in Debugging, VC++ | Leave a comment

Accelerating Debug Runs, Part 2: _ITERATOR_DEBUG_LEVEL

A previous post discussed the Windows Debug Heap – with the main motivation being how to avoid it, as it is just empty, expensive overhead, and it isn’t clear why it is on by default in the first place. Remarkably, … Continue reading

Posted in Debugging, VC++ | 1 Comment

Accelerating Debug Runs, Part 1: _NO_DEBUG_HEAP

(A more appropriate but even-less-catchy title might have been ‘accelerating runs from the debugger‘. As elaborated below, these two are not strictly equal). A common notion is that debug builds can and should carry as much debugging overhead as one … Continue reading

Posted in Debugging, Visual Studio, Win32 | Leave a comment

Debugging Memory Corruption II

Some years ago I shared a trick that let’s you call _CrtCheckMemory from the debugger anywhere, without re-compilation.   The updated (as of VS2013) string to type at a watch window is: {,,msvcr120d.dll}_CrtCheckMemory() Let’s expand on that today, in two steps. … Continue reading

Posted in Debugging, VC++ | 3 Comments

Debugging Handle Leaks

This is all well documented stuff and I won’t go into details – it’s here mostly for self reference (3rd time I had to chase this down in google). Steps are: (1) Install WDK to integrate the WinDbg engine with … Continue reading

Posted in Debugging, Visual Studio, Win32 | Leave a comment

Setting a Watch on Wide Registers in VS

General-purpose registers can be watched from the watch window pretty much as regular variables: (the ‘$’ prefix is optional, but is recommended by MS – probably as means to minimize clashes with code variables.) It is less known that you … Continue reading

Posted in Debugging, VC++ | Leave a comment