ABOUT VC BREAKPOINTS

上一篇 / 下一篇  2012-06-11 15:50:00 / 个人分类:转载

Debug error:"One or more breakpoints cannot be set

        今天vc6调试的时候出现了怪事,明明可以下断点得地方在调试时提示:One or more breakpoints cannot be set,网上也找不到答案就自己摸索。vc6给的反汇编地址也完全不是程序入口地址,而昨天还好好地能调试呢!,后来发现在任何地方下断点都会出以上提示,那么我的vc肯定有问题了。右键菜单关联的unlock也打不开,我想系统肯定有些变动。想起昨天晚上刚装vs2010,装到一半不想装了。
        我打开任务管理器,发现多了一个进程:mscorsvw.exe,对应的服务是:Microsoft .NET Framework NGEN v4.0.30319_X86,然后我将此服务关掉禁用,好长时间后此服务才乖乖结束。再进vc6,可以调试了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!           我相信我的经验可定能帮到很多人
51Testing软件测试网H+re,D w)eO,l

 51Testing软件测试网+m'Q@MZ E)mb k0]

a%I t"N8uT0 

;fcQK4?[+l0

*Y3ud4j'A&s}0网上摘录的该问题的其他可能原因如下:51Testing软件测试网)dI(@|H#J
Debug error:"One or more breakpoints cannot be set and have been disabled.Execution will stop at the beginning of the program."51Testing软件测试网,_ Fl/g%vn _1ST
 
~.sQ~Ct t oM0一、调试一般的程序51Testing软件测试网 v],_M p+C/S/zko
在VC6.0里面调试的时候,有时候会出现下面这条警告:One or more breakpoints cannot be set and have been disabled.   Execution will stop at the beginning of the program,特别是调试DLL工程的时候,经常出现,非常烦,原来红色的断点标识变成了空心圆,此时如果继续调试所有的断点都失效了。解决方法有以下两个,一个不行试第二个。

|A:D!D1Y Cj-i [~051Testing软件测试网2y W:X[:s)a(y

1、直接在菜单Build里面执行Rebuild All,一般能解决问题。

fQNp`051Testing软件测试网1T_AOY/~i R

2、

~ f@%}C s1l0Fk051Testing软件测试网)a_Rhao$P'wV"@

a.在Project菜单中选择setting,弹出设置对话框,选中c/c++页,注意Gateory选中General,将debug info设置为program databse for edit and continue ;

r1{P*?WQG(E _%Y0

*O.wXeQjO0b.在Edit菜单中,选择Breakpoints,在弹出的对话框中点击 Remove All 按钮;

J Y:oK5l w;o0

7N+r C3Nr0c.Build菜单,Set Active Project Configuration...,在弹出的对话框中选中 myprj.exe Win32 Debug。

Fh0_L,\#]iB C051Testing软件测试网y!C(WGf8ZU*`,M

(Checking your Active configuration is Debug or Release,虽然两种状态下均可调试,但有时就是有些问题,所以尽量在Debug下调试,这也是好的编程习惯。51Testing软件测试网.m` rfl r'`g%X3q

L}8FNl9V.xW0问题所在:你的工程设置可能无调试数据库51Testing软件测试网i;\K tj9q1\)U
二、调试DLL
$Zmo{|s2x \0问题用MSDN的描述51Testing软件测试网ow ug4l'P3N*Z$S^g
However, if one or more of the debuggees have not been designated to the debugger, there will be no symbolic information for the debugger to use when walking through its breakpoint list. Situations where this is likely to occur include:
J(ct:secO0Attempts to set breakpoints in a DLL before the call to LoadLibrary.51Testing软件测试网o4qc8g]
Setting a breakpoint in an OLE server before the container has started the server.
N%cYA?&ZW`0Other similar cases.51Testing软件测试网 m DSh#cp0eJ9U v[
NOTE: After you receive notification that these breakpoints cannot be set, the breakpoints will usually continue to show up in the breakpoint list, but they will have a dash (-) to their left, indicating that they are disabled (have not been set).

/Y r5s6rmWqzO0

3B4~/q@/De0解决方法:需要加入DLL名称
e$M)YLJ,P0MUENU:Project-->Setting-->Debug-->Category:AdditialDLLs(Modules for adding your dll's name)51Testing软件测试网7N&F~&aI1\@[5L#r


:W&\\0g z6n0

TAG:

 

评分:0

我来说两句

日历

« 2024-05-01  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 15663
  • 日志数: 34
  • 书签数: 1
  • 建立时间: 2009-09-03
  • 更新时间: 2015-04-02

RSS订阅

Open Toolbar