Author Topic: debug with a bumblebee 3d card (optirun)  (Read 3809 times)

Offline unamigo

  • Single posting newcomer
  • *
  • Posts: 4
debug with a bumblebee 3d card (optirun)
« 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...) ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13153
    • Travis build status
Re: debug with a bumblebee 3d card (optirun)
« Reply #1 on: December 18, 2012, 02:20:28 pm »
Probably you'll have to run it from terminal and then use Debug -> Attach
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: debug with a bumblebee 3d card (optirun)
« Reply #2 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.
« Last Edit: December 18, 2012, 05:35:26 pm by jens »

Offline unamigo

  • Single posting newcomer
  • *
  • Posts: 4
Re: debug with a bumblebee 3d card (optirun)
« Reply #3 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.