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:

Configuring TUN/TAP virtual network interface for use with QEMU on Xubuntu 24.04

Configuring TUN/TAP virtual network interface for use with QEMU on Xubuntu 24.04 I am planning to run qemu-system-ppc to play around QEMU ...