Code::Blocks Forums

User forums => Help => Topic started by: Baco on June 02, 2007, 08:22:02 pm

Title: Breakpoints during running
Post by: Baco 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?
Title: Re: Breakpoints during running
Post by: rickg22 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.
Title: Re: Breakpoints during running
Post by: MortenMacFly 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.
Title: Re: Breakpoints during running
Post by: byo 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
Title: Re: Breakpoints during running
Post by: Baco 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.
Title: Re: Breakpoints during running
Post by: byo 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