Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: unamigo on December 18, 2012, 01:21:54 pm

Title: debug with a bumblebee 3d card (optirun)
Post 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...) ?
Title: Re: debug with a bumblebee 3d card (optirun)
Post by: oBFusCATed on December 18, 2012, 02:20:28 pm
Probably you'll have to run it from terminal and then use Debug -> Attach
Title: Re: debug with a bumblebee 3d card (optirun)
Post by: Jenna on December 18, 2012, 05:32:57 pm
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.
Title: Re: debug with a bumblebee 3d card (optirun)
Post by: unamigo on December 19, 2012, 10:24:58 am
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.