Author Topic: debugging line by line!!! SOLVED  (Read 14204 times)

Offline ubun2os

  • Single posting newcomer
  • *
  • Posts: 7
debugging line by line!!! SOLVED
« on: March 02, 2012, 06:45:24 pm »
hi for all.
ai'm beginner in Code::Block.  and i didn't find any IDE in c++ coding else Code::Block.

i am following an IDE with full feature with Debugging same as VS. i tested codelite and geany but no thing of them weren't my interested IDE.
therefore i have to use  Code::Block in linux.

my question is, how to debugg line by line. i insert break point in one or two line of my code and trace it with F7 key. i want trace with out break point.
is there any key for it?

another question that reach to my mind is , is there internal output as terminal that it has been patched in Code::Block?(as new version of codelite)

very tnx.
« Last Edit: March 08, 2012, 09:53:01 am by ubun2os »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13093
    • Travis build status
Re: debugging line by line!!!
« Reply #1 on: March 02, 2012, 10:22:33 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 Radek

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: debugging line by line!!!
« Reply #2 on: March 03, 2012, 03:53:27 pm »
You can do everything. You can "trace into", "step over", "next instruction", "run to breakpoint", or "run". All these actions are in your Debug menu, all these actions have their hotkeys, all these hotkeys can be changed in the Settings menu.

Unlike most of "normal" debuggers, there is no "default breakpoint" at the beginning of your app. On starting a debugger, the app will run until it finds one. If it finds none, it will run until it terminates or crashes. Therefore, you always need to set some breakpoint before starting a debugger. Then you can debug your app line by line, set another breakpoint elsewhere and run to it, or do something different.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13093
    • Travis build status
Re: debugging line by line!!!
« Reply #3 on: March 03, 2012, 07:21:15 pm »
Unlike most of "normal" debuggers, there is no "default breakpoint" at the beginning of your app...
In fact you're wrong here. If one uses "Debug->Step into" instead of "Debug->Start / Continue" the debugger should stop at the first instruction/line of the main function.
(I don't know if this works in trunk, thought, but works like charm in the debugger's branch)
(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 ubun2os

  • Single posting newcomer
  • *
  • Posts: 7
Re: debugging line by line!!!
« Reply #4 on: March 07, 2012, 05:19:08 pm »
Quote
"Debug->Step into" instead of "Debug->Start / Continue"
that is okey.
Quote
is there internal output as terminal that it has been patched in Code::Block?(as new version of codelite)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13093
    • Travis build status
Re: debugging line by line!!!
« Reply #5 on: March 07, 2012, 05:21:30 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 ubun2os

  • Single posting newcomer
  • *
  • Posts: 7
Re: debugging line by line!!!
« Reply #6 on: March 07, 2012, 06:29:31 pm »
i don't know terminal's name. ???
is there way to change x-terminal to gnome-terminal with same attribute?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13093
    • Travis build status
Re: debugging line by line!!!
« Reply #7 on: March 07, 2012, 06:34:17 pm »
Yes, Settings -> Environment -> General-> Terminal to launch.
If you can't get the correct command search the forum.
(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!]