问题
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:
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.
来源:https://stackoverflow.com/questions/28572335/eclipse-cdt-cannot-debug-to-step-into-function-definition-in-same-directory