Eclipse CDT cannot debug to step into function def

2019-08-19 16:37发布

I am new to eclipse cdt. I did a little research but did not find an answer. I wonder, say I have a project/simpleClient/simpleClient.cc that calls functions under project/src/somefile.cc. When I put a debugger in simpleClient.cc, and call function A, I only know by right clicking the function name will take me to the function definition, but I actually want to step into it to the src folder code and see how the program runs. Are there any ways please?

Thank you.

1条回答
ら.Afraid
2楼-- · 2019-08-19 17:16

Under Run -> Debug Configurations -> [Your debug config], click the Source tab and see if the project and all associated subdirectories are in the source search path.

That's how Eclipse CDT tools find the sources to display while debugging, so chances are, the file is not being found on this path.

I think by default, the tool searches the project directory for all sources, so something else is likely preventing it from being found.

Also, if you're running in Windows, using Cygwin, you might have the problem described here. If so, the instructions provided should fix the mapping and let you see your sources.

查看更多
登录 后发表回答