作者uziel (= ̄ω ̄=)
看板Eclipse
標題[問題] 寫 C/C++ 程式無法使用 Debug 功能
時間Fri Aug 27 07:43:54 2010
先說明我的環境:
Eclipse IDE for Java Developers (Version: Helios)
用內建的 Install New Software 功能 (Help → Install New Software...) 安裝 CDT
編譯器是 MinGW (MinGW-5.1.6.exe)
Debugger 安裝的是 gdb-6.3-2.exe
在前一版的 Eclipse Galileo 還可以執行 debug 的作業,但是換成 Helios 之後
出現以下情況:
編寫一個 C 的 program ,可以 build 也可以 run ,但是按下 debug 按鈕之後
console 視窗出現一列紅字:No symbol "auto" in current context.
然後冒出一個錯誤訊息對話方塊,裡面的 Details 顯示:
Error in final launch sequence
Failed to execute MI command:
-gdb-set auto-solib-add on
Error message from debugger back end:
No symbol "auto" in current context.
No symbol "auto" in current context.
去 Google 找解答,找到一個類似情況的解法:
打開 Preferences 對話方塊,找到 Run/Debug → Launching →
Default Launchers ,然後在右邊的 Launch Type/Mode 方塊裡面選擇
C/C++ Application → [Debug] , 將 Preferred Launcher 方塊裡的選項
改成 Standard Create Process Launcher
以上步驟完成了以後我再嘗試按下 debug 按鈕,結果冒出錯誤訊息:
No such debugger.
Google 半天也沒有相關的討論
不曉得在 Helios 要怎麼配置 MinGW 的 debug 環境才好?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.137.190.240
1F:→ uziel:找到方法了:Window → Preferences ,然後 Run/Degug → 08/31 06:45
2F:→ uziel:Launching → Default Launchers , 將 [Debug] 設定為 08/31 06:46
3F:→ uziel:Standard Create Process Launcher ,接下來開啟要 debug 的 08/31 06:49
4F:→ uziel:C/C++ 專案,Run → Debug Configurations,畫面左邊選擇要 08/31 06:52
5F:→ uziel:debug 的執行檔,右邊切換到 Debugger 分頁,將 Debugger 08/31 06:54
6F:→ uziel:設定為 MinGW gdb 即可。 08/31 06:55