Microsoft KB Archive/103716

= INFO: Debug Session Still Active Even After Last "}" of Main =

Article ID: 103716

Article Last Modified on 12/1/2003

-

APPLIES TO

 Microsoft Visual Workbench for Windows, when used with:  Microsoft Visual C++ 5.0 Learning Edition

 Microsoft Visual C++ 2.0 Professional Edition

 Microsoft Visual C++ 2.1

 Microsoft Visual C++ 4.0 Professional Edition</li></ul>

 Microsoft Visual C++ 1.0 Professional Edition</li></ul>

 Microsoft Visual C++ 1.5 Professional Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q103716

<div class="notice_section">

<div class="summary_section">

SUMMARY
When stepping over the last curly brace "}" of main, WinMain, or LibMain, the message box

There is no source line debugging information

appears and prompts for an OK. This indicates that the debugging session is still active and that there is no source code available for the remaining executable statements.

<div class="moreinformation_section">

MORE INFORMATION
This is an expected behavior of the integrated debugger. To terminate the debugging session, press F5 (GO). This results in the message box:

Process <X> terminated, exit code <X> (X).

Pressing ALT+F5 to stop the debugging session also works. However, using ALT+F5 is not recommended because this method completely stops the debugger. The program's exit code is not executed and other resources may not be freed.

It is possible to step past the closing curly brace by switching to mixed source and assembly mode. Press CTRL+F7 or select the View menu and Choose Mixed Source/Asm. This enables you to step into the assembly code for the exit code. The exit code terminates the program and is executed by the run-time library after all the executable statements in a program are completed. When the final line of assembly code is reached, the above message will appear.

Keywords: kbinfo kbide KB103716

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.