调试问题:“断点当前不会被命中。指定的模块尚未加载“ [英] Debug problem: "The breakpoint will not currently be hit. The specified module has not been loaded"

查看:190
本文介绍了调试问题:“断点当前不会被命中。指定的模块尚未加载“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




使用VS2005和运行CF2的Windows CE 5.0设备。突然间我无法从VS2005调试我的C#程序 - 设置断点时我只看到一个戒指

而不是正常的红点并且当鼠标悬停在我看到一条

消息说:断点当前不会被击中。指定的

模块尚未加载。调试一个普通的完整的
框架应用程序时我没有问题。我没有在我的设置中更改任何内容(afaik)

并且在重新启动后以及在一个全新的和

默认项目中也存在问题!?!


搜索Google没有给出任何结果,所以任何帮助都非常适合。


谢谢

Ole

解决方案

嘿,


我在Visual Studio 2005中遇到过类似的行为。问题

这里似乎是模块的事实。由

调试器启动并不是与你所领导和构建的源相同。


例如(强烈简化):

我正在c:\ VSS2005 \ MyProject中编辑一个项目

我正在将项目构建到c:\ VSS2005 \ MyProject \ Bin \Debug


调试器启动c:\ VSS2005 \OtherProject \ Bin \Debug \ project.exe


因此,错误的项目开始了!

我通过从头开始重新创建整个项目来解决这个问题

(从Visual Studio菜单中选择New project并手动添加所有项目

源文件使用添加现有项目)。不知怎的,我的项目文件

完全是f ## ked up,所以重新创建这些解决了这个问题。


希望这会有所帮助,


Alke Wiebenga


Ole schreef:





使用VS2005和运行CF2的Windows CE 5.0设备。突然间我无法从VS2005调试我的C#程序 - 设置断点时我只看到一个戒指

而不是正常的红点并且当鼠标悬停在我看到一条

消息说:断点当前不会被击中。指定的

模块尚未加载。调试一个普通的完整的
框架应用程序时我没有问题。我没有在我的设置中更改任何内容(afaik)

并且在重新启动后以及在一个全新的和

默认项目中也存在问题!?!


搜索Google没有给出任何结果,所以任何帮助都非常适合。


谢谢

Ole


我猜测有(至少)涉及2个项目,一个参考

另一个;


通常这意味着正在运行的应用程序已经从其他地方加载了它的dll

(例如GAC)并且它不匹配。检查参考文献,如果有助于调试,可以将项目引用切换到项目引用。


Marc




Ole schreef:





使用VS2005和Windows CE 5.0运行CF2的设备。突然间我无法从VS2005调试我的C#程序 - 设置断点时我只看到一个戒指

而不是正常的红点并且当鼠标悬停在我看到一条

消息说:断点当前不会被击中。指定的

模块尚未加载。调试一个普通的完整的
框架应用程序时我没有问题。我没有在我的设置中更改任何内容(afaik)

并且在重新启动后以及在一个全新的和

默认项目中也存在问题!?!


搜索Google没有给出任何结果,所以任何帮助都非常适合。


谢谢

Ole


哦,对不起我以前的帖子。我的错!!! :)

我有点读过你说你已经尝试过的部分

开始一个新项目。


唯一我能想到的原因是调试器搞砸了。它

加载的模块与你正在编辑的源无关。你有没有

检查出调试器选项(符号等)以及

普通的任何东西?

Hi,

Using VS2005 and a windows CE 5.0 device running CF2. Suddenly I can''t debug
my C# program from VS2005 - when setting a breakpoint I only see a ring
instead of the normal red dot and when holding the mouse over it I see a
message saying: "The breakpoint will not currently be hit. The specified
module has not been loaded". I have no problem when debugging a normal full
framework application. I have not changed anything in my settings (afaik)
and the problem is also present after a reboot and in a total new and
default project !?!

Searching Google gave no result so any help is highly appriciated.

Thanks
Ole

解决方案

Hey,

I''ve experienced similar behaviour in Visual Studio 2005. The problem
here seems to be the fact that the "modules" being started by the
debugger aren''t the same as the source you''re lediting and building.

For example (strongly simplified):
I''m editing a project in c:\VS2005\MyProject
I''m building the project to c:\VS2005\MyProject\Bin\Debug

The debugger starts c:\VS2005\OtherProject\Bin\Debug\project.exe

Hence, the wrong project is started!
I solved this issue by recreating the entire project from scratch
(select "New project" from the Visual Studio menu and manually add all
your source files using "Add existing item"). Somehow my project files
were totally f##ked up, so recreating these solved the problem.

Hope this helps,

Alke Wiebenga

Ole schreef:

Hi,

Using VS2005 and a windows CE 5.0 device running CF2. Suddenly I can''t debug
my C# program from VS2005 - when setting a breakpoint I only see a ring
instead of the normal red dot and when holding the mouse over it I see a
message saying: "The breakpoint will not currently be hit. The specified
module has not been loaded". I have no problem when debugging a normal full
framework application. I have not changed anything in my settings (afaik)
and the problem is also present after a reboot and in a total new and
default project !?!

Searching Google gave no result so any help is highly appriciated.

Thanks
Ole


I''m guessing that there are (at least) 2 projects involved, one referencing
the other;

Usually this means that the running app has loaded its dll from elsewhere
(e.g. the GAC) and it doesn''t match. Check the references, switching
(temporarily) to project referencing if it helps to debug.

Marc



Ole schreef:

Hi,

Using VS2005 and a windows CE 5.0 device running CF2. Suddenly I can''t debug
my C# program from VS2005 - when setting a breakpoint I only see a ring
instead of the normal red dot and when holding the mouse over it I see a
message saying: "The breakpoint will not currently be hit. The specified
module has not been loaded". I have no problem when debugging a normal full
framework application. I have not changed anything in my settings (afaik)
and the problem is also present after a reboot and in a total new and
default project !?!

Searching Google gave no result so any help is highly appriciated.

Thanks
Ole

Oh, sorry for my previous post. My bad!!! :)
I kinda read over the part where you say that you already tried
starting a new project.

The only reason I can think of is that the debugger is screwing up. It
loads modules which aren''t tied to the source you''re editing. Have you
checked out the debugger options (symbols etc.) for anything out of the
ordinary?


这篇关于调试问题:“断点当前不会被命中。指定的模块尚未加载“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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