I have a large C++ project, different parts of which are compiled in different ways (bjam/make). I was having trouble getting it to build from within Eclip开发者_JS百科se. Could I build the code externally (with g++ -g
), and then just run the debugger from within Eclipse?
I figured it out. Should've looked earlier at this: http://wiki.eclipse.org/CDT/User/FAQ#Debugging_C.2FC.2B.2B_Projects
I first added my project to eclipse. Then I followed the instructions above to set up a debug configuration. And somewhat surprisingly eclipse is able to figure out that the binary I want to run refers to the project that I have open, and so I can actually set breakpoints, step through the code while eclipse shows me which line in which file I'm at, etc. So its exactly as if I built the project from within eclipse. Its impressive :)
精彩评论