Debugging Qt ApplicationsIn the Debug mode you can interact with the debugger in several ways, including the following:
Qt Creator displays the raw information provided by the native debuggers in a clear and concise manner with the goal to simplify the debugging process as much as possible without losing the power of the native debuggers. In addition to the generic IDE functionality provided by stack view, views for locals and watchers, registers, and so on, Qt Creator includes features to make debugging Qt-based applications easy. The debugger plugin understands the internal layout of several Qt classes, for example, QString, the Qt containers, and most importantly QObject (and classes derived from it), as well as most containers of the C++ Standard Library and some gcc and Symbian extensions. This deeper understanding is used to present objects of such classes in a useful way. For an example of how to debug applications in the Debug mode, see Debugging the Example Application. For more information about the functions available in the Debug mode, see Interacting with the Debugger. If you install Qt Creator as part of a Qt SDK, the GNU Symbolic Debugger is installed automatically and you should be ready to start debugging after you create a new project. If you want a special setup, such as using debugging tools for Windows, see Setting Up Debugger. Modes of OperationThe debugger plugin runs in different operating modes depending on where and how the process is started and run. Some of the modes are only available for a particular operating system or platform. You can launch the debugger in the following modes:
When you click the Start Debugging button, the debugger is launched in the appropriate operating mode (plain, terminal, or TRK), based on the build and run settings for the active project. Select Debug menu options to launch the debugger in the other modes. Plain ModeTo launch the debugger in the plain mode, click the Start Debugging button for the active project, or choose Debug > Start Debugging > Start and Debug External Application... and specify an executable. Terminal ModeTo launch the debugger in the terminal mode, select Projects > Run Settings and select the Run in terminal check box. Then click the Start Debugging button for the active project. Attach ModeTo launch the debugger in the attach mode, select Debug > Start Debugging > Attach to Running External Application..., and then select a process by its name or process ID to attach to. Remote ModeThe remote mode uses a gdbserver daemon that runs on the remote machine. To launch the debugger in the remote mode, select Debug > Start Debugging > Start and Attach to Remote Application.... Core ModeThe core mode is available only in Unix. It debugs crashed processes using the core files (crash dumps) that are generated if the setting is enabled in the shell. To enable the dumping of core files, enter the following command in the shell from which the application will be launched: ulimit -c unlimited To launch the debugger in the core mode, select Debug > Start Debugging > Attach to Core.... Post-Mortem ModeThe post-mortem mode is available only on Windows, if you have installed the debugging tools for Windows. The Qt Creator installation program asks you whether you want to register Qt Creator as a post-mortem debugger. To change the setting, select Tools > Options... > Debugger > Common > Use Creator for post-mortem debugging. You can launch the debugger in the post-mortem mode if an application crashes on Windows. Click the Debug in Qt Creator button in the error message that is displayed by the Windows operating system. TRK ModeThe TRK mode is a special mode available only for Symbian. It debugs processes running on a Symbian device using the App TRK application that runs on the device. To launch the debugger in the TRK mode, open the project, select Symbian as the target, and click the Start Debugging button. For more information on setting up Symbian projects, see Setting Up Development Environment for Symbian.
X
|