Microsoft KB Archive/318367

= FIX: Cannot step into ATL, CRT, or MFC source code during debugging =

Article ID: 318367

Article Last Modified on 7/29/2005

-

APPLIES TO


 * Microsoft Visual C++ .NET 2002 Standard Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Academic Edition

-



This article was previously published under Q318367



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
When you try to step into the ATL, CRT, or MFC source code files while debugging a project, you receive the following error message:

There is no source code available for the current location.



CAUSE
In the current Solution, the Debug Source Files paths are not set correctly, which can occur if the following registry key is missing the Source Directories value or if the current user does not have permissions to write to the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0



RESOLUTION
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To resolve this problem, do one of the following:  Use the Registry Editor to give users write permissions to the HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0 registry key. Manually add the directories for the ATL, CRT, and MFC source files.

NOTE: You must follow these steps for each Solution.  In the Solution Explorer, right-click the Solution, and then click Properties. Expand the Common Properties folder, and then click Debug Source Files. In the Search these paths for sources files list box, add the full path to the folders in which the debugger will locate source files. The following are the default paths for the ATL, CRT, and MFC source files, where  is the drive on which Visual Studio .NET is installed:







</ol> </li></ul>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Microsoft Visual C++ .NET 2003 and in Microsoft Visual Studio .NET 2003.

<div class="moreinformation_section">

MORE INFORMATION
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

The same behavior occurs in the Microsoft Visual Studio .NET Trial Edition, regardless of the user permissions for the registry key. To resolve the problem, follow these steps: <ol> Start Registry Editor (Regedt32.exe).</li> Click the following key in the registry:

HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0

</li> On the Edit menu, click New, and then click String Value. Add the following registry value, where  is the drive where Visual Studio .NET is installed:

Value Name: Source Directories

Value Data:  :\Program Files\Microsoft Visual Studio .NET\Vc7\crt\; :\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\src\mfc\; :\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\src\atl\

Make sure that you use the path where Visual Studio .NET is installed.</li> Close Registry Editor.</li></ol>

NOTE: The Microsoft Visual Studio .NET Trial Edition is not a supported product. The information in this article is provided as-is and is subject to change without notice. No formal product support is available from Microsoft for this Trial Edition product.

Keywords: kbbug kbfix kbide kbdebug kbpending kbvs2002sp1sweep KB318367

-

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

© Microsoft Corporation. All rights reserved.