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:

SBCL Hello world

SBCL Hello, world! Version info: - OS: Windows 11 23H2 (Microsoft Windows [Version 10.0.22631.7079]) - Emacs: 30.2 - SBCL : 2.6.4 - SLI...