Author Topic: Step Into  (Read 5876 times)

Offline meridius10

  • Single posting newcomer
  • *
  • Posts: 3
Step Into
« 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Step Into
« Reply #1 on: July 30, 2011, 07:02:05 pm »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline meridius10

  • Single posting newcomer
  • *
  • Posts: 3
Re: Step Into
« Reply #2 on: July 30, 2011, 08:47:59 pm »
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...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Step Into
« Reply #3 on: July 30, 2011, 09:07:11 pm »
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).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline meridius10

  • Single posting newcomer
  • *
  • Posts: 3
Re: Step Into
« Reply #4 on: July 31, 2011, 12:23:04 pm »
OK - I need to practice a few and see how I go. Thanks for the info.