您的位置:首页 > 其它

One or more breakpoints cannot be set and have been disabled...

2013-01-05 15:48 555 查看
从师姐那里拷贝过来的程序居然不能调试,很郁闷,哈哈,多亏看到网上的帖子,这里也贴一下吧。

现象是用 debug中的 step info或者run to cursor合着设置断点会出现One or morebreakpointscannot be set and have been disabled.   Execution will stopat the beginning of the program.解决方法,

1.在project->setting->c/c++-general->debug info->program databse for edit and continue ;

2.edit->breakpoints->removeall;

3.build->set active project configuration->*.exe win32 debug.

经过以上三步,ok!

另一篇:

一、两种调试方式:

1、Debug模式:

2、Release模式:

单击菜单[Project]->[Settings…],出现"Project Settings"对话框,选择“Release”状态;

将C/C++标签中的Category选择General,Optimizations选Disable (Debug),Debug info选Program Database;

在Link标签中选中Generate debug info复选框。

注:Release模式稍好点,因为某些情况程序只能在Release下运行,如“显示对话框的DLL”在Debug下显示出窗口后就死在那里。

二、调试中可能的错误:“不能调试”、“断点错误”。

1、“不能调试”:

One or more breakpoints cannot be set and have been disabled. Execution will stop at the beginning of the program.”

2、“断点错误”:

"One or more breakpoints are not positioned on valid lines.Thesebreakpoints have been moved to the next valid line."

注意:“不能调试”跟“断点错误”不是一回事,“断点错误”会禁用某些错误断点,但“不能调试”则会禁用所有断点。

三、解决方法

1、对于“断点错误”,VC会自动帮我们定位到一行,我们不用理会!

2、对于“不能调试”,解决步骤如下:

1)、重起电脑

2)、把工程拷贝到新目录,删除ncb, .opt,.plg文件。 注意是拷贝,不是剪切。

3)、再菜单栏(menu):Build->Rebuild All。

fortran内部函数出错信息解释 内部函数出错信息解释

[sourcefile(line)]run-time error M62××MATH

错误号 函数级数学错误信息

M6201 functionnames:DOMAIN error

函数的自变量超出了约定的取值域,例如sqrt(-1)

M6202 functionname:SING error

无意义的变量。例如log10(0)

M6203 functionname:OVERFLOW error

函数的结果值或其中一个既时计算值太大以致不能表示,例如EXP(250000.0)

M6204 functionname:UNDERFLOW error

函数的结果值或其中一个既时计算值太小以致不能表示。

M6205 functionname:TLOSS error

完全丢失精度,例如COS(1E30)

M6206 functionname:PLOSS error

fortran debug模式设置和技巧

CVF中有两种编译(连接、执行)模式:release模式和debug模式。调试程序时,宜用debug模式;调好后再用release模式,得到高效的执行程序。设定debug模式:点击菜单Build/Set Active Project Configuration,选 *- Win32 Debug,OK,即设定为debug模式。以debug模式执行:点击“Go (F5)”按钮,或直接按F5键,则执行程序,并在第一个出错语句处停止,在该语句前有一个小黄色箭头。若程序没错,则一直执行完毕,自动关闭dos窗口。此时,宜用“!”按钮或“Ctrl+F5”键,执行完成后,dos窗口等待用户关闭。设置断点:若希望执行时在某一语句处暂停,可将光标置于该语句,点击“手”形状的按钮,或按F9键,则程序执行到该语句时停在该语句处。单步执行:F10(不进入子过程程序段)或者F11(遇到子过程进入子过程程序段继续单步执行)。在工具栏上都有相应的按钮。查看变量值:小黄箭头停在某语句时,按下Variable按钮,显示当前程序段的变量值;对于简单变量,将光标放在该变量上,则即时显示该变量值。先简单说这么多。
如何用Debug模式获得更多的提示信息 依次选择/打开:Project => Settings => Fortran => Compilation Diagnostics 建议选中以下各项: Argument Mismatch (类型不一致) Data Alignment (数据排列错位) Uncalled Routines (从无调用的子过程) Undeclared Symbols (未声明变量、过程等) Uninitialized Variables (未赋初始值的变量) Unused Variables
(从未用到的变量) Usage (用法) 用了这些选项,可以对很多潜在的问题给予警告,使代码更为规范安全。注意:Uninitialized Variables只对简单变量有效,对数组无效。如果简单变量a未给初值,而用于 b=3.0*a,则编译时将报错,但是如果a是个数组变量,则不报错。(不知后来的Intel VF版本有没有改进?) 另外也建议以下设置:Fortran Standard Checking: Fortran 90/95这样,非标准的、厂家扩充的语法功能就会给出警告。

Visual Fortran常见运行错误

Insufficient virtual memory 虚拟内存不足

Integer overflow 整数溢出错误

Integer divide by zero 整数除0错误

Floating overflow 浮点数溢出错误

Floating divide by zero 浮点数除0错误

Floating underflow 浮点数下溢错误

Floating point exception 浮点数异常错误

Subscript out of range 数组定义超出边界

Floating-point conversion failed 浮点数格式转换失败

Null pointer error 空指针错误

Stack overflow 堆栈溢出

String length error 字符串长度超出允许范围

Substring error 数组下标超出允许范围

Range error 整数值超出允许范围

Allocatable array is already allocated 数组重复定义

Program Exception - array bounds exceeded 引用数组下标超出允许范围

Program Exception - denormal floating-point operand 非法浮点数操作符

Program Exception - floating stack check 浮点数堆栈检查

Program Exception - integer divide by zero 整数除0错误

Program Exception - integer overflow 整数溢出

Program Exception - privileged instruction 非法执行特权指令

Program Exception - illegal instruction 非法指令

Program Exception - stack overflow 堆栈溢出

Array or substring subscript expression out of range 数组下标低下数组定义下界或高于数组定义上界

CHARACTER substring expression out of range 字符串非法表示

Label not found in assigned GOTO list 不属于GOTO语句引用的标号

INTEGER arithmetic overflow 整数运算结果出现溢出

INTEGER overflow on input 输入的整数值超出允许范围

Invalid INTEGER 非法整数值

REAL indefinite (uninitialized or previous error) 产生非法实数

Invalid REAL 非法实数

REAL math overflow 实数值溢出

No matching CASE found for SELECT CASE select case语句中缺少case项

INTEGER assignment overflow 整数定义超出允许范围

A edit descriptor expected for CHARACTER 字符型数据的格式化输入和输出需要A编辑符

E, F, D, or G edit descriptor expected for REAL 实数型数据的格式化输入和输出需要E,F,D,G编辑符

I edit descriptor expected for INTEGER 整数型数据的格式化输入和输出需要I编辑符

L edit descriptor expected for LOGICAL 逻辑型数据的格式化输入和输出需要L编辑符

Multiple radix specifiers 输入或输出语句重复说明

Array already allocated 数组已分配

Array size zero or negative 数组大小为0或负数

Array not allocated 没有被分配的数组

Invalid argument 非法参数

Invalid number in input 输入非法数字

Invalid string in input 输入非法字符串

Comma missing in COMPLEX input 输入的多个表达式
4000
之间缺少逗号

T or F expected in LOGICAL read 输入的逻辑值必须是T或F

Illegal character in hexadecimal input 输入非法的十六进制数

Integer expected in format 格式语句中要求的整数

Initial left parenthesis expected in format 格式语句中多余的左括号

Positive integer expected in format 格式语句中要求用正整数

Integer expected preceding H, X, or P edit descriptor 在H、X、P编辑符前要求用整数

'.' expected in format 在D、E、F、G编辑符中w和d域之间用'.'分隔

Unexpected end of format 格式语句没有结束

Unexpected character in format 格式语句中的非法字符

M field exceeds W field in I edit descriptor 在I编辑符中M域的值大于W域的值

Integer out of range in format 格式语句中的整数值超出允许范围

Separator expected in format 格式语句中需要分隔符

Out of range: substring starting position 'pos' is less than 1 子字符串的起始位置小于1

Out of range: substring ending position 'pos' is greater than string length 'len' 子字符串的终止位置大于字符串长度

Out of memory 内存不足

Cannot allocate temporary array -- out of memory 由于内存不足不能分配临时数组

Cannot ALLOCATE allocatable array -- out of memory 由于内存不足不能分配数组

DEALLOCATE failure: ALLOCATABLE array is not ALLOCATED 释放没有被分配的数组
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  exception
相关文章推荐