News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to use Debugger?

Started by Schmidti, October 25, 2006, 07:42:20 AM

Previous topic - Next topic

Schmidti

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

Pecan

#1
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.




MortenMacFly

#2
Quote from: Pecan on October 25, 2006, 03:33:58 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...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Pecan

Quote from: MortenMacFly on October 25, 2006, 04:10:49 PM
Quote from: Pecan on October 25, 2006, 03:33:58 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



MortenMacFly

Quote from: Pecan on October 26, 2006, 02:58:51 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Schmidti

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!


superbem

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

Jenna

Please do not hijack a more than 6 years old thread !

Topic locked !