PRB: Debugger Loses Source/Disassembly File Mapping

ID: Q127802


The information in this article applies to:
  • The Integrated Debugger, used with:
    • Microsoft Visual C++, 32-bit Editions, versions 2.0, 2.1, 4.0, 5.0


SYMPTOMS

If you choose Cancel when asked for the location of a source file while debugging, you will not get another chance to map the disassembly code to its corresponding source file.

For example, suppose that you have moved a source file belonging to the debug version of a program to some other directory. When you step into that code in the debugger, you will get a dialog box asking where the source file is located. If you then choose to Cancel that dialog box, a Disassembly window will be opened for the source. If you continue debugging and later step through the code that causes the same source file to be opened again, Visual C++ will automatically open up the Disassembly window and will not ask again for the source location.


CAUSE

In trying to prevent asking the user for a file's location over and over again, Visual C++ does not display the dialog box again if you chose Cancel the first time. If you subsequently decide that you really do want to see the source for a file, you must follow the steps listed below in the Resolution section.


RESOLUTION

Use the following steps to work around this behavior:

  1. Close the Disassembly window.


  2. Open the source file in an editor window.


  3. Step into the code generated by that source, or double-click the current frame (the top) of the call stack. In Visual C++ 2.x, the Call Stack window can be opened by selecting Debug | Call Stack from the Visual Workbench main menu. In Visual C++ 4.0, the Call Stack window can be opened by choosing Call Stack from the View menu. This step reestablishes the source link.


Thereafter, the debugger will not open the Disassembly window for code generated from that source, but will open the source file itself. You may reopen the Disassembly window if you wish, and it will be properly mapped to the open copy of the source file. If that source file is later closed and then needs to be reopened in the editor, you will once again be asked for the location of the file.


STATUS

This behavior is by design.

Additional query words: IDE

Keywords : kbDebug kbide kbVC200 kbVC210 kbVC400 kbVC500 kbVC600
Version : winnt:2.0,2.1,4.0,5.0
Platform : winnt
Issue type : kbprb


Last Reviewed: July 19, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.