The debugging tips included in this article are:
See Also Debugging Tips in ATL Services
You can have your program call the DebugBreak Win32 function at the point in your code that you want debugging to start. Calling this function causes the program to display a dialog box as if it had crashed. Click Cancel to start the debugger and continue on in debug mode.
ATL has built-in support for debugging QueryInterface calls. You enable this support using the following two-step process.
To enable QueryInterface debugging:
Once you've enabled QueryInterface debugging, the debug output window of Developer Studio will display the name of each interface that is queried for on your object.
ATL has built-in support for debugging AddRef and Release calls. You enable this support using the following process.
To enable reference count debugging:
With reference count debugging enabled, the debug output window of Developer Studio will display the corresponding interface name and its current reference count every time AddRef or Release is called on one of your interfaces.