Menu

Debugger in DEV-C++ IDE

2002-12-05
2012-09-26
  • Nobody/Anonymous

    To this day I have never managed to get the integrated GDB to work.

    Has anyone managed to use it to debug Windows programs? If so, could they help to write the HELP manuals?

    I still resort to the insight-5.0 from www.objectcentral.com (but it has some bugs). Seems noone is able to build a later version of Insight for Windows.

    BlakJak  :]

    P.S. Running DEV-C++ v4.9.7.0

     
    • Nobody/Anonymous

      You must make certain that your linker option, to generate debugging information, is set before you compile your project.

      You must have a project with a source file! I've had problems using the debugger when compiling a single source file that did not belong to a project.

      Once you have your project compiled, pick a function or statement, in one of your source files, and left click in the gutter. This will set a breakpoint. Then click the Debug button. The application will be launched and will execute all statements up to that point. An shortcut is to find your statement or function and right click on that line and select "Run to cursor". This will perform the same steps above with out as many explicit actions.

      Either before or after you've started your program under the debugger, position the cursor on a variable that your interested in and click "Add Watch". This will add it to the list and once it has a value you'll see it displayed.

      The Next Step button will take you to the next statement. If the current statement is a function and you want to move into that function then click Step Into. The Continue button will cause the program to continue execution until the next breakpoint or to the end of the program.

      If you really want to get more technical than this then you'll need to look up the user manual for the gdb debugger at: http://www.gnu.org/manual/gdb-5.1.1/gdb.html

      Hope this helps!
      Matthew

       
    • Nobody/Anonymous

      You must make certain that your linker option, to generate debugging information, is set before you compile your project.

      You must have a project with a source file! I've had problems using the debugger when compiling a single source file that did not belong to a project.

      Once you have your project compiled, pick a function or statement, in one of your source files, and left click in the gutter. This will set a breakpoint. Then click the Debug button. The application will be launched and will execute all statements up to that point. An shortcut is to find your statement or function and right click on that line and select "Run to cursor". This will perform the same steps above with out as many explicit actions.

      Either before or after you've started your program under the debugger, position the cursor on a variable that your interested in and click "Add Watch". This will add it to the list and once it has a value you'll see it displayed.

      The Next Step button will take you to the next statement. If the current statement is a function and you want to move into that function then click Step Into. The Continue button will cause the program to continue execution until the next breakpoint or to the end of the program.

      If you really want to get more technical than this then you'll need to look up the user manual for the gdb debugger at: http://www.gnu.org/manual/gdb-5.1.1/gdb.html

      Hope this helps!
      Matthew

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.