Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator - debug function - exit function
QtWS25 Last Chance

Qt Creator - debug function - exit function

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 3.3k Views
  • 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 Offline
    J Offline
    johanelm
    wrote on last edited by
    #1

    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
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      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
      0
      • J Offline
        J Offline
        johanelm
        wrote on last edited by
        #3

        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
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved