6/12/08

How to debug an exe( application) which is launched from another exe(application) ?

1. Set the MessageBox in the another exe( source code)which you want to debug, at the location (function where you want to debug) or at initinstance if you want to debug from beginning.
Compile the code and build the exe.

2. Launce Maina Exe (first application).

3. Launch second exe from first exe.

4. Second exe will halt at the MessageBox location till user is not clicking ok button.

5. now open Visual Studio editor. select Debug->Processes, from process select your second exe name. and click attach process.

6. Now second application will be in debugging mode and hault at messageBox.

7. Now put the break point after the MessageBox code in second exe.

8. Click ok button on MessageBox.

9. Debugger will halt at the break point placed after the MessageBox code.

now you can debug your second exe(application) here onwards.

No comments:

ITUCU