Visual Studio 2008 - 代码与调试源位置不同步 [英] Visual Studio 2008 - code out of sync with the location for debug source

查看:43
本文介绍了Visual Studio 2008 - 代码与调试源位置不同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 Visual Studio 2008 项目的标签签​​出到一个新的本地文件夹.(本地文件夹与我通常处理 HEAD 代码的位置不同.)

I've checked out a tag for a Visual Studio 2008 project into a new local folder. (The local folder is different than where I normally work on HEAD code.)

我对项目进行了清理"和重建"——这创建了一个 DLL 文件.它成功重建并位于正确的构建区域.

I did a 'clean' and 'rebuild' on the project -- which created a DLL file. It rebuilt successfully and is located in the correct build area.

当我查看 Solution Explorer 中的文件时,它显示了正确的绝对路径新文件夹中的所有文件.

When I look at the files in Solution Explorer, it shows the correct absolute path for all the files within the new folder.

问题是当我设置断点并尝试调试代码时,它永远不会命中断点.当我右键单击断点并查看位置"时,它会向我显示文件上传到 SVN.我不明白它是从哪里得到那条老路的.

The problem is that when I set a breakpoint and try to debug the code, it never hits the breakpoint. When I right click on the breakpoint and look at 'Location' it shows me a path to where the file had been in the HEAD area when it was uploaded into SVN. I don't see where it is getting that old path from.

推荐答案

以下是可能出错的小清单:

Here's a small checklist of things that can go wrong:

  1. 验证加载的模块(通常Ctrl + D + M).查看您的代码模块是否从您希望它们加载的位置加载.

  1. Verify loaded Modules (Ctrl + D + M usually). See that your code modules are loaded from where you expect them to load.

执行清理/重建时,仅清理项目的输出(如果我有构建 MyASsembly.dllMyAssembly 项目,则仅清理与此项目将被删除.在清理过程中不会删除任何其他引用的程序集.

When doing clean/rebuild, only the project's output is cleaned (if I have MyAssembly project that builds a MyASsembly.dll, only the file relevant for this project will be removed. Any other assemblies that are referenced are not deleted in the cleanup process.

尝试隔离问题.使用 F10 开始调试(进入调试代码).查看入口点是否正常,但只有您尝试点击的其他一些代码取自错误的位置.

Try to isolate the issue. Start debugging with F10 (step into the debugged code). See if the entry point is OK, but only some other code that you're trying to hit is taken from the wrong location.

这篇关于Visual Studio 2008 - 代码与调试源位置不同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆