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

從師姐那裏拷貝過來的程序居然不能調試,很鬱悶,哈哈,多虧看到網上的帖子,這裏也貼一下吧。

現象是用 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 輸入的多個表達式之間缺少逗號
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 釋放沒有被分配的數組

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章