Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: unamigo on December 18, 2012, 01:21:54 pm
-
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...) ?
-
Probably you'll have to run it from terminal and then use Debug -> Attach
-
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.
-
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.