Running script from Debugger

General questions regarding the usage of CodeLite
yllawwally
CodeLite Curious
Posts: 1
Joined: Thu Aug 15, 2019 3:10 am
Genuine User: Yes
IDE Question: C++
Contact:

Running script from Debugger

Post by yllawwally » Thu Aug 15, 2019 3:24 am

Hello,
How can I run a python script when a breakpoint is reached? On the breakpoint windows, there is a command list box. This seems where I should be able to run a script. If that is the correct place, what is it expecting there? Also it seems sometimes breakpoints will get erased, is there a common reason this might be happening. Thanks for any assistance.

I'm using codelite version 12.0.4
Ubuntu 18.0.4
gdb 8.1

DavidGH
CodeLite Plugin
Posts: 583
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Running script from Debugger

Post by DavidGH » Thu Aug 15, 2019 1:10 pm

Hi,
On the breakpoint windows, there is a command list box. This seems where I should be able to run a script. If that is the correct place, what is it expecting there?
Yes, that's the place. As you can see from it's tooltip, you add the commands you want to be run: e.g.
print foo
cont

I've not tried running a python script. I suggest you test things direct with gdb in a terminal, then use whatever works there.
Also it seems sometimes breakpoints will get erased, is there a common reason this might be happening.
Yes, it's always happened :( . However it's so random and intermittent that I've not found a cause.

Regards,

David

Post Reply