User forums > Using Code::Blocks

debug with a bumblebee 3d card (optirun)

(1/1)

unamigo:
Is there a way to debug an OpenGL program in CodeBlocks with a bumblebee card. I found a way to run it from within Codeblocks by adding "optirun" to the terminal launch option in Environment -> General.
But what about being able to debug (break points, trace...) ?

oBFusCATed:
Probably you'll have to run it from terminal and then use Debug -> Attach

Jenna:
Did you try it ?

I just did and the opengl test program (or better my gnome-terminal) runs below optirun (at least ps shows it this way).
And it stops at a breakpoint as expected.

The only issue seems to be, that the console does not close after the inferior has finished.

unamigo:
Thanks a lot for the tip. Entering the PID every time was a bit of a pain. So I think I found a better way. 
I type : optirun bash from a console. For now on, every program run from that console will use optirun.
So I launch codeblocks from that console, and then I can debug a prog as usual, but this time running on the Nvidia card.

Navigation

[0] Message Index

Go to full version