Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Creator - debug function - exit function

    Tools
    2
    3
    3116
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      johanelm last edited by

      I use the debug mode of QT creator for a C program. I put breakpoints for all exit and "return 0" functions which are the only options to terminate the program. I run the code in the debug mode but the program is always terminating by itself without any error message. Moreover, it does not hit the breakpoints that I added. Is there anyway to see what line/function calls the exit function? or what was the last line that was executed in the program?

      Thank you.

      1 Reply Last reply Reply Quote 0
      • K
        koahnig last edited by

        welcome to devnet

        You need to give at least some details on the environment you are using (OS, Qt creator version, compiler, debugger, ...).
        Can you step into your source code at all?

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply Reply Quote 0
        • J
          johanelm last edited by

          Thank you

          Sorry that I forgot to write main details.

          I am using ubuntu 12.04 and installed Qt SDK (fulll name of the package is: Complete Qt Software Development Kit) by Ubuntu Software Center. Qt creator version is "Qt Creator 2.4.1 Based on Qt 4.8.0 (64 bit)". I use all the default settings in the Qt Creator, I just installed it couple hours ago (I needed to format my pc) but I have been using the Qt Creator before.

          Tools > Options > Build & Run > Tool Chains shows GCC (x86 64bit) and GCC (x86 32Bit). I use the debug option on the toolbar of the Qt Creator.
          Here is my .pro file
          TEMPLATE = app
          CONFIG += console
          CONFIG -= qt
          CONFIG += thread
          CONFIG += debug
          SOURCES += main.c

          I am able to step into the source code. The code works fine for 40 sec, then the program stops by itself without any warning/error signal and it does not stop on the breakpoints that I put for exit functions and return 0; of the main function.

          I wonder is there any way to see on the debug properties to see what line/function calls the exit function and what was the executed line on the code?

          1 Reply Last reply Reply Quote 0
          • First post
            Last post