Breakpoints issue

Sysprogs forums Forums VisualGDB Breakpoints issue

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #615
    bfx
    Participant

    Hi,

    I am using Visual GDB on Windows for Android dev’t.

    It is an OpenGL ES application. I have two C++ functions. The first is setup / initialization. Setting a breakpoint in that code is NOT hit. That’s my problem.

    However the second function is the render function, that gets called every frame (30 times a second, lets say). THOSE breakpoints ARE hit.

    It seems that it takes a while before GDB / GDBServer wake up and start working properly. I think the application is started and starts running, THEN gdbserver is started? Is that the reason/ problem?

    One trick I can do, but it is painful and time consuming, is sleep/lock the android phone, then start the app, then turn unlock the device, which THEN allows the application to start, and THEN my first breakpoint is hit.

    What is going on? Is there a better way? Should I put a call to sleep() or something? Or should gdbserver be started sooner?

    Thanks.

    #2558
    support
    Keymaster

    Hi,

    First starting the app and then attaching to it is the default behavior of the Android debugger.
    You can override it by selecting Android->Debug Options->Debug App Startup in Visual Studio.
    Once you select that option, starting debugging will take slightly longer, but all your initialization breakpoints will be hit.

    #2559
    bfx
    Participant

    Worked! Thank you! 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.