Author Topic: How to use Debugger?  (Read 96809 times)

Schmidti

  • Guest
How to use Debugger?
« on: October 25, 2006, 07:42:20 am »
Hi...

how can i use the debugger? I want to watch variables, while i step manual through single lines of code...
Is this possible with Code:Blocks?

greetings

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: How to use Debugger?
« Reply #1 on: October 25, 2006, 03:33:58 pm »
Make sure your project is compiled with the -g compiler option.



Start the debugger, open the watches window from the debugger menu, set your breakpoints with a right click in the left margin of the target line, right click on the variable to watch.



« Last Edit: October 25, 2006, 04:30:04 pm by Pecan »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How to use Debugger?
« Reply #2 on: October 25, 2006, 04:10:49 pm »
Make sure your project is compiled with the -g compiler option. [...]
Pecan, do you mind adding this to the WiKi? It has been asked soooo many times - so we could just point to that page then instead of repeating ourselves again and again...
With regards, Morten.

Edit: I vote placing the (initial) article here: http://wiki.codeblocks.org/index.php?title=User_documentation under "Application development". Something like "Debugging with Code::Blocks" or so...
« Last Edit: October 25, 2006, 04:19:47 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: How to use Debugger?
« Reply #3 on: October 25, 2006, 04:27:43 pm »
Make sure your project is compiled with the -g compiler option. [...]
Pecan, do you mind adding this to the WiKi? It has been asked soooo many times - so we could just point to that page then instead of repeating ourselves again and again...
With regards, Morten.

Edit: I vote placing the (initial) article here: http://wiki.codeblocks.org/index.php?title=User_documentation under "Application development". Something like "Debugging with Code::Blocks" or so...

Acknowledge. Will begin work on it today.

Schmidti

  • Guest
Re: How to use Debugger?
« Reply #4 on: October 25, 2006, 06:24:29 pm »
Thanks, it works 8)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: How to use Debugger?
« Reply #5 on: October 26, 2006, 02:58:51 am »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How to use Debugger?
« Reply #6 on: October 26, 2006, 08:26:15 am »
Wiki debugger instructions:

http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks

Nice! :D Thanks a lot! 8) I've added this link to my sig... immediately. ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Schmidti

  • Guest
Re: How to use Debugger?
« Reply #7 on: October 28, 2006, 10:39:14 am »
Oh, i have still two questions?

- Is it possible to number the Array in the Watches-Menu? Cause if you have a array with over 1000 data, its still impossible to see whats in the array[723].
- How can i watch a 2 dimemsion (or higher) Array? If i add it to the "Watches" its still only in one dimension!


Offline superbem

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: How to use Debugger?
« Reply #8 on: January 18, 2013, 12:19:07 am »
I builded sucessfully CB from svn today (8792) and see that the automatic inclusion of local variables and function arguments have not being reimplemented yet.
This is  :(
A healthy debugger is imprescendible.
When do you think it will be working?

Another thing not related, my build show svn 0 instead 8792. Wonder why?

Regards

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How to use Debugger?
« Reply #9 on: January 18, 2013, 12:38:45 am »
Please do not hijack a more than 6 years old thread !

Topic locked !