How do I use GDB in Eclipse for C/C++ Debugging?

后端 未结 2 898
感动是毒
感动是毒 2020-12-03 14:47

I\'m a Visual Studio user and am used to breakpoints for debugging. I\'m now working in a linux environment and am using Eclipse as an IDE. I\'m a newbie in linux and eclips

2条回答
  •  长情又很酷
    2020-12-03 15:04

    The following instructions are for Eclipse 3.5 (Galileo). For 3.6 (Helios), they are similar except for the link in step 2.

    1. Go to Help > Install New Software.
    2. Add the CDT repository http://download.eclipse.org/tools/cdt/releases/galileo to the list of repositories.
    3. Select the CDT Repository. Now you need to install the CDT plugin along with GDB support from the list of available plugins (Select the CDT Main Features as well as CDT GNU Toolchain Debug support).

    You should now be able to set breakpoints and inspect values of variables in Eclipse.

    An alternative is to install DDD (an GUI frontend for GDB).

提交回复
热议问题