Monday, February 21, 2005

Debugging applications that arent started up directly

Very often, we have to create applications that arent executed directly. Instead these applications are started by another app. An example : Our company develops GIS tools for SocetSet and Imagine. Our application is loaded when the user clicks on a menu option in the main executable of SocetSet or Imagine. To debug our application, we normally load it up from the main applications menu. Once our app is running, we use the Attach to process option to start the debuger. Here is another more convenient method. its using the Image File Execution option. Every application that loads checks with some registry settings. One of these is the debugger key under: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options by setting the debugger option, you can have your application automatically load the debugger - so that you can step through it. Pretty cool.

No comments: