Debugging Windows Service Startup with Service Isolation

Tuesday, May 10, 2011

A year and a half ago I touched on the subject of debugging process startup, such as the startup of Windows Services, using the GFlags utility (the ImageFileExecutionOptions registry key). The general idea is to rely on the Windows loader to launch a debugger instead of the debugged process, and trace your way through the process startup code. Unfortunately, this relies on the debugged process to run in the same session as you—otherwise, you won’t be able to actually see the debugger. Starting from Windows Vista, Windows services are isolated into a separate session to which you...