Saturday, May 15, 2021

Debugging COM server startup problem using Visual Studio Debugger

This is closely related to debugging COM server using CDB/WinDbg combination

Debugging startup or registration of out of process COM server can be tricky as the process is being started by the COM infrastructure (RpcSs). To debug a COM server called myserver.exe, do run the following:

c:\> reg.exe ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\myserver.exe" /v debugger /t REG_SZ /d  "vsjitdebugger.exe" /f

The next time myserver.exe is activated the Visual Studio debugger will popup and provide an option to run a new instance or attach to an existing session.

Note that same technique applies to Windows service.

No comments:

QNX 7.1 error booting up a VM - "ldd:FATAL: Failed to load lazyload dependency. Unresolved symbol: _ITM_registerTMCloneTable"

QNX 7.1 error booting up a VM - "ldd:FATAL: Failed to load lazyload dependency. Unresolved symbol: _ITM_registerTMCloneTable" I r...