Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: meridius10 on July 30, 2011, 04:56:37 pm
-
I have been used to using the debugger in Excel and using Step Into where I can view the VB Editor on one half of the screen and the Excel worksheet on the other half, which has proved very useful to see a program running through each line of code.
In Code Blocks, if I Debug > Step Into, there isn't much difference between doing this and actually Build > Run.
How can I see the program running through each individual line of code?
-
Have you read this: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
-
I got to the first stage, but it looks like I have to go to Build Options for every single new project and change to -[g]?
Then on Add Watches, I actually don't have any Watches to add, so I can't seem to proceed. If I'm supposed to add a Watch what should I put in it, if it should be generally used?
Can I do all this through main.cpp?
Sorry am a bit new to all this...
-
You add a watch for every variable you want to inspect.
And yes you should add the -g for every project you want to debug. The standard practice is to have two targets per project one is "debug" one is "release" (full optimizations and no symbols).
-
OK - I need to practice a few and see how I go. Thanks for the info.