解决eclipse调试c++程序出现“No source file named” error

http://blog.initm.com/eclipse-error-debug/

前些天遇到的问题这是,早就应该写了,但是需要做的事情太多,一直拖到要走了,拖不动了,写!和上一篇文章是相关的,因为我换了一个编辑器eclipse,第一次用,所以遇到一些问题,提示出现No source file named  怎么解决呢?

试了几次没有效果之后开始百度。中文的没有找到相关的文章,于是开始找英文的,英文很水,但是能看懂大概意思。下面我来说一下解决方法:

1.首先我们打开Debug Configurations

Debug Configurations

2.在弹出的窗口中选择Select other

选择Select other

3.然后在弹出的对话框中勾选Use configuration specific settings  然后选择Standard Create Process Launcher  确定

Use configuration specific settings  然后选择Standard Create Process Launcher  确定

4.然后打开Debugger选项卡,如下设置一下

Debugger

5.然后勾选这个Use full file path to set breakpoints

Use full file path to set breakpoints

OK  搞定

参考资料:

http://stackoverflow.com/questions/12965726/no-source-file-named-error-debugging-eclipse-cdt





http://wp.brodzinski.net/eclipse/source-file-named-main-c-gdb-error/

„NO SOURCE FILE NAMED” – GDB ERROR IN ECLIPSE LUNA


Recently I came across a quite difficult problem during setting up a debug configuration for my STM32 ARM development environment in Eclipse.
When I was running a I always got „file not found” error in GDB console.

GDB error:
1
2
Function "0x8000000" not defined.
No source file named C:\\ARM\\workspace\\blinky\\src\\main.c.

No source file named ... GDB error

Solution:

Go to your Debug Configuration -> Configure Workspace Settings
Debug Configurations window.

Expand Run/Debug -> Launching -> Default Launchers 
Select GDB Hardware debugging -> Debug (or Release depending on your Configurations)
Select option Legacy GDB Hardware Debugging Launcher
Then click Apply and OK
Changing launcher.

Then click Apply and OK

Now debug should work without any problems.

Related links:

http://stackoverflow.com/questions/19864204/eclipse-mingw-cdt-gdb-and-problems-with-debugging


猜你喜欢

转载自blog.csdn.net/adaptiver/article/details/72459323
今日推荐