VC6.0调试警告,不知如何解决,请各位高手指点!

xunxj107 2012-01-12 11:24:15
在VC6.0里面调试的时候,有时候会出现下面这条警告:One or more breakpoints cannot be set and have been disabled. Execution will stop at the beginning of the program,原来红色的断点标识变成了空心圆,此时如果继续调试所有的断点都失效了。以下的两个方法是我百度找到的。
1、直接在菜单Build里面执行Rebuild All,一般能解决问题。

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

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

c.Build菜单,Set Active Project Configuration...,在弹出的对话框中选中 myprj.exe Win32 Debug。(注,如果本来就是Debug模式,这步可以省略)

照着以上的两个方法试过,可是问题还是没有解决,还是出现警告:One or more breakpoints cannot be set and have been disabled. Execution will stop at the beginning of the program。该怎样解决?这个问题不解决,我就没法调试程序。请高手指点!
...全文
125 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
wyx100 2012-01-13
  • 打赏
  • 举报
回复


这样写,Release也不影响,不需要调试的话,最好去掉,或者用一个宏包起来,需要调试的时候就定义XXXX,否则就不定义,Debug和Release版本,直接运行应该都没有问题。
xunxj107 2012-01-13
  • 打赏
  • 举报
回复
#include "stdafx.h"
#include <iostream>
#include "con_dis.h"
#include "con_disDlg.h"
#include "pa.h"
#include"CC.h"
#pragma warning(disable:4101)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
_asm int 3 (加在这个地方了)
#endif

编译出现以下错误:
error C2146: syntax error : missing ';' before identifier 'dlgAbout'
warning C4551: function call missing argument list
error C2065: 'dlgAbout' : undeclared identifier
error C2228: left of '.DoModal' must have class/struct/union type
执行 cl.exe 时出错.
请高手指点!
xunxj107 2012-01-13
  • 打赏
  • 举报
回复
#include "stdafx.h"
#include <iostream>
#include "con_dis.h"
#include "con_disDlg.h"
#include "pa.h"
#include"CC.h"
#pragma warning(disable:4101)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
_asm int 3 (加在这个地方了)
#endif

编译出现以下错误:
error C2065: 'THIS_FILE' : undeclared identifier
xunxj107 2012-01-13
  • 打赏
  • 举报
回复
#ifdef XXXX(比如_DEBUG)
_asm int 3
#endif
这样写,编译出现以下错误:
error C2065: 'THIS_FILE' : undeclared identifier
Eleven 2012-01-12
  • 打赏
  • 举报
回复
警告信息说的很明白了吧.不过最好这样写
...
#ifdef XXXX(比如_DEBUG)
_asm int 3
#endif
...

这样写,Release也不影响,不需要调试的话,最好去掉,或者用一个宏包起来,需要调试的时候就定义XXXX,否则就不定义,Debug和Release版本,直接运行应该都没有问题。
xunxj107 2012-01-12
  • 打赏
  • 举报
回复
我还想知道:One or more breakpoints cannot be set and have been disabled. Execution will stop at the beginning of the program 这个警告是什么原因引起的?我写的程序,以前没遇到这种情况。请您指点!
xunxj107 2012-01-12
  • 打赏
  • 举报
回复
这个警告:User breakpoint called from code at 0x4034e6 我点击确定以后,可以进行调试。我不用理会这个警告是吗?对程序没有影响吧?这个警告是什么意思呢?
Eleven 2012-01-12
  • 打赏
  • 举报
回复
这个没关系,直接确定,F10就下去了,因为这个你主动加的
xunxj107 2012-01-12
  • 打赏
  • 举报
回复
我照着你的做的,可是又出现这样一个警告:User breakpoint called from code at 0x4034e6 该怎样解决呀?高手指点!
Eleven 2012-01-12
  • 打赏
  • 举报
回复
报什么错?
xunxj107 2012-01-12
  • 打赏
  • 举报
回复
加了上述那句话,可是编译有错误呀?应该怎样加呀?
Eleven 2012-01-12
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 xunxj107 的回复:]

在需要加断点的语句前面加吗?如:_asm int 3 int len7=Str2Hex(m_edit10str10,data7);
[/Quote]

_asm int 3
int len7=Str2Hex(m_edit10str10,data7);
xunxj107 2012-01-12
  • 打赏
  • 举报
回复
在需要加断点的语句前面加吗?如:_asm int 3 int len7=Str2Hex(m_edit10str10,data7);
Eleven 2012-01-12
  • 打赏
  • 举报
回复
是在并,在需要的地方手动添加上
_asm int 3

然后F5进入Debug模式

16,548

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • AIGC Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧