Author Topic: Breakpoints during running  (Read 4825 times)

Offline Baco

  • Single posting newcomer
  • *
  • Posts: 9
Breakpoints during running
« on: June 02, 2007, 08:22:02 pm »
I'm trying to debug a win32 gui application.
I'm using the NB 3989 with the mingw bundled with the CB RC2 (gdb 6.3).
I cant set a new breakpoint when the application is in running state.
It is really not possible to set a new breakpoint when the application is running?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Breakpoints during running
« Reply #1 on: June 03, 2007, 12:19:40 am »
I haven't studied the debugging plugin very well, but setting breakpoints depends on GDB, and when the app's running, GDB's coordinating so it can't set breakpoints (AFAIK). However, they could be queued.  Have you tried setting a breakpoint, pausing the app and see if the breakpoint is effectively set?

In any case, please submit it as a feature request in Berlios.
« Last Edit: June 03, 2007, 12:21:51 am by rickg22 »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Breakpoints during running
« Reply #2 on: June 03, 2007, 11:03:56 am »
I'm using the NB 3989 with the mingw bundled with the CB RC2 (gdb 6.3).
Before submitting a feature request please try a nightly build (there is a forum section accordingly). Concerning the debugger an awful lot of work has been done meanwhile and I'm pretty sure this wouln't happen with a more recent C::B revision.
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

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Breakpoints during running
« Reply #3 on: June 03, 2007, 02:30:51 pm »
There IS possibility to add breakpoint while program is running.

You just have to stop it for a few seconds, add breakpoint and resume execution.

First one can be achieved by pressing the (X) button in debugger toolbar (when it's pressed for the first time, it breaks the execution, but when you press it second time it will kill the program so be carefull with it). Adding breakpoint and resuming should be quite easy then.

Regards
   BYO

Offline Baco

  • Single posting newcomer
  • *
  • Posts: 9
Re: Breakpoints during running
« Reply #4 on: June 03, 2007, 04:54:35 pm »
Thank you byo for the workaround.

So as you said is not possible to add breakpoints while program is running: you have to stop it and then resume execution.

I cant believe that! :shock:
All the debuggers i have ever tried had this feature.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Breakpoints during running
« Reply #5 on: June 04, 2007, 11:03:16 pm »
Thank you byo for the workaround.

So as you said is not possible to add breakpoints while program is running: you have to stop it and then resume execution.

I cant believe that! :shock:
All the debuggers i have ever tried had this feature.


They probably do this exactly the same way, but it's done automatically - so not a big thing. In fact it's a miracle that it actually can be done using gdb on windows ;)

BYO