Watching variables in Dev C++

This is a discussion on Watching variables in Dev C++ within the C++ Programming forums, part of the General Programming Boards category; Alright I'm pretty new at using Dev C++ and need to find out how to watch a single variable. Alright ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    26

    Watching variables in Dev C++

    Alright I'm pretty new at using Dev C++ and need to find out how to watch a single variable.

    Alright so I go into the debug menu, select "Watch Variables," enter the variables name... Now what? I'm unsure on how to use the debugger. Can anyone help me out?

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Well, I tried using debugging with dev c++, and everytime I click on debug, it says there is no debugging information, and it asks me if I would like to recompile with debug info. When I click yes, it recompiles and when I click on debug again, I get the same message.

    I just installed dev c++ a few days ago, and in my opinion the compiler is a piece of junk.
    Last edited by 7stud; 12-19-2005 at 11:47 AM.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    you get what you pay for -- the compiler is pretty good for its price. Remember -- it is free and open source.

    I've had the same problem with the debugger, and gave up trying to use it (the debugger).

  4. #4
    ♥Sexy Coding Hunk♥ CartoonLarry's Avatar
    Join Date
    Dec 2003
    Location
    Michigan
    Posts
    50
    Well, I tried using debugging with dev c++, and everytime I click on debug, it says there is no debugging information, and it asks me if I would like to recompile with debug info. When I click yes, it recompiles and when I click on debug again, I get the same message.
    I've had the same problem with the debugger, and gave up trying to use it (the debugger).
    In Compiler Options of Dev-C++ check "Add the following commands when calling compiler:"

    And then type in the following in the textbox below:

    -g3 -gstabs

    Then goto Settings tab|Linker and select Yes under "Generate debugging information"

    Then click ok

    You should be able to debug now.

  5. #5
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    I don't get that message any more, but when I click on debug, the program runs to conclusion. If I click step into nothing happens.

  6. #6
    ♥Sexy Coding Hunk♥ CartoonLarry's Avatar
    Join Date
    Dec 2003
    Location
    Michigan
    Posts
    50
    I don't get that message any more, but when I click on debug, the program runs to conclusion. If I click step into nothing happens.
    Did you 'rebuild all' after making the changes?

    Have you tried to set a breakpoint?

    I was able to debug after I made the changes, so I don't know what to tell you.

    Maybe someone else on the board will have some suggestions.

    Alright so I go into the debug menu, select "Watch Variables," enter the variables name... Now what? I'm unsure on how to use the debugger. Can anyone help me out?
    I normally just right click the variable names once I am in debug mode.
    The names will be listed on the left hand side with the values.

  7. #7
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    I got it to work if I put the cursor at the top and click on run to cursor.

  8. #8
    ♥Sexy Coding Hunk♥ CartoonLarry's Avatar
    Join Date
    Dec 2003
    Location
    Michigan
    Posts
    50
    I never have used 'step into' to start debugging. I normally just set a breakpoint and then select debug and go from there.

    FYI:
    I tried using 'step into' to start and it also didn't work for me. Of course, once I am debugging 'step into' works to step into functions.
    Last edited by CartoonLarry; 12-20-2005 at 12:32 PM.

  9. #9
    Registered User
    Join Date
    Oct 2005
    Posts
    26
    hehe glad to see I'm not the only one having trouble with this silly dev c++ debugger. Thanks for the help guys.

  10. #10
    ♥Sexy Coding Hunk♥ CartoonLarry's Avatar
    Join Date
    Dec 2003
    Location
    Michigan
    Posts
    50
    Have you ever tried eclipse?

    http://www.eclipse.org/cdt/

    I like it a lot.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. basic question about global variables
    By radeberger in forum C++ Programming
    Replies: 0
    Last Post: 04-06-2009, 12:54 AM
  2. Best way to avoid using global variables
    By Canadian0469 in forum C++ Programming
    Replies: 7
    Last Post: 12-18-2008, 11:02 AM
  3. Father and Son Variables
    By khdani in forum Linux Programming
    Replies: 3
    Last Post: 11-28-2008, 05:42 PM
  4. Replies: 15
    Last Post: 09-30-2008, 02:12 AM
  5. static variables
    By Luigi in forum C++ Programming
    Replies: 4
    Last Post: 04-24-2003, 07:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21