aboutsummaryrefslogtreecommitdiffstats
path: root/doc/qtcreator/src/debugger
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2023-02-08 14:01:56 +0100
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2023-02-13 14:37:39 +0000
commit1e6933f48d9a2141755b9ed5549bd2f790d8d9e4 (patch)
tree11c5794f1afbb2b872b4a24df4b69811d967d2f3 /doc/qtcreator/src/debugger
parent70506ff1360cccccc81ccfd1cc6ba48152e4a8b4 (diff)
Doc: Reorganize the Debugger topic
Divide the long topics into shorter ones and reorganize the information. The next step will be to improve the current topics: check that the information is complete, add screenshots for all views, add links between related topics, and so on. Task-number: QTCREATORBUG-28778 Change-Id: I3549289a2be512bb09f45c91f85b12f89cedbe97 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'doc/qtcreator/src/debugger')
-rw-r--r--doc/qtcreator/src/debugger/creator-debug-views.qdoc (renamed from doc/qtcreator/src/debugger/creator-debugger-common.qdocinc)182
-rw-r--r--doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc (renamed from doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdocinc)19
-rw-r--r--doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc364
-rw-r--r--doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc2
-rw-r--r--doc/qtcreator/src/debugger/qtquick-debugging.qdoc13
5 files changed, 357 insertions, 223 deletions
diff --git a/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc b/doc/qtcreator/src/debugger/creator-debug-views.qdoc
index ac4a2e4164..d0aa7b86da 100644
--- a/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc
+++ b/doc/qtcreator/src/debugger/creator-debug-views.qdoc
@@ -1,13 +1,54 @@
-// Copyright (C) 2022 The Qt Company Ltd.
+// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
+ \page creator-stack-view.html
+ \if defined(qtdesignstudio)
+ \previouspage creator-debugging-qml.html
+ \else
+ \previouspage creator-debug-mode.html
+ \endif
+ \nextpage creator-breakpoints-view.html
+
+ \title Viewing Call Stack Trace
+
+ When the program being debugged is interrupted, \QC displays the nested
+ function calls leading to the current position as a call stack trace. This
+ stack trace is built up from call stack frames, each representing a
+ particular function. For each function, \QC tries to retrieve the file name
+ and line number of the corresponding source file. This data is shown in the
+ \uicontrol Stack view.
-//! [debugger-breakpoints]
+ \image qtcreator-debug-stack.png {Stack view}
+
+ Since the call stack leading to the current position may originate or go
+ through code for which no debug information is available, not all stack
+ frames have corresponding source locations. Stack frames without
+ corresponding source locations are grayed out in the \uicontrol Stack view.
+
+ If you click a frame with a known source location, the text editor jumps to
+ the corresponding location and updates the \uicontrol {Locals} and
+ \uicontrol {Expressions} views, making it seem like the program
+ was interrupted before entering the function.
- \section1 Setting Breakpoints
+ To find out which QML file is causing a Qt Quick 2 application to crash,
+ select \uicontrol {Load QML Stack} in the context menu in the
+ \uicontrol Stack view. The debugger tries to retrieve the JavaScript stack
+ from the stopped executable and prepends the frames to the C++ frames,
+ should it find any. You can click a frame in the QML stack to open the QML
+ file in the editor.
+*/
+/*!
+ \page creator-breakpoints-view.html
+ \previouspage creator-stack-view.html
+ \if defined(qtdesignstudio)
+ \nextpage creator-locals-view.html
+ \else
+ \nextpage creator-threads-view.html
+ \endif
+ \title Setting Breakpoints
You can associate breakpoints with:
@@ -49,7 +90,7 @@
(\uicontrol {Unclaimed Breakpoint}) icon, when they refer to a position
in code.
- \image qtcreator-debugger-breakpoint-preset.png "Breakpoint Preset" view
+ \image qtcreator-debugger-breakpoint-preset.png {Breakpoint Preset view}
When a debugger starts, the debugging backend identifies breakpoints
from the set of unclaimed breakpoints that might be handled by the
@@ -80,7 +121,7 @@
\image qtcreator-debug-breakpoints.png "Breakpoints view"
- \section2 Adding Breakpoints
+ \section1 Adding Breakpoints
To add breakpoints:
@@ -124,11 +165,11 @@
\endlist
\if defined(qtcreator)
- \section2 Specifying Breakpoint Settings
+ \section1 Specifying Breakpoint Settings
You can specify settings for breakpoints in \uicontrol Edit >
\uicontrol Preferences > \uicontrol Debugger. For more information,
- see \l{Specifying Debugger Settings}.
+ see \l{Debugger Preferences}.
To use a full absolute path in breakpoints, select the
\uicontrol {Set breakpoints using a full absolute path} check box.
@@ -162,7 +203,7 @@
{Breakpoints, Watchpoints, and Catchpoints} in GDB documentation.
\endif
- \section2 Moving Breakpoints
+ \section1 Moving Breakpoints
To move a breakpoint:
@@ -175,7 +216,7 @@
line number in the \uicontrol {Line number} field.
\endlist
- \section2 Deleting Breakpoints
+ \section1 Deleting Breakpoints
To delete breakpoints:
@@ -195,7 +236,7 @@
\endlist
- \section2 Enabling and Disabling Breakpoints
+ \section1 Enabling and Disabling Breakpoints
To temporarily disable a breakpoint without deleting it and losing associated
data like conditions and commands:
@@ -223,7 +264,7 @@
With the notable exception of data breakpoints, breakpoints retain their
enabled or disabled state when the debugged program is restarted.
- \section2 Setting Data Breakpoints
+ \section1 Setting Data Breakpoints
A \e {data breakpoint} stops the program when data is read or written at the
specified address.
@@ -254,49 +295,23 @@
is unlikely that the used addresses will stay the same at the next program
launch. If you really want a data breakpoint to be active again, re-enable
it manually.
+*/
-//! [debugger-breakpoints]
-
-//! [debugger-call-stack-trace]
-
- \section1 Viewing Call Stack Trace
-
- When the program being debugged is interrupted, \QC displays the nested
- function calls leading to the current position as a call stack trace. This
- stack trace is built up from call stack frames, each representing a
- particular function. For each function, \QC tries to retrieve the file name
- and line number of the corresponding source file. This data is shown in the
- \uicontrol Stack view.
-
- \image qtcreator-debug-stack.png
-
- Since the call stack leading to the current position may originate or go
- through code for which no debug information is available, not all stack
- frames have corresponding source locations. Stack frames without
- corresponding source locations are grayed out in the \uicontrol Stack view.
-
- If you click a frame with a known source location, the text editor jumps to
- the corresponding location and updates the \uicontrol {Locals} and
- \uicontrol {Expressions} views, making it seem like the program
- was interrupted before entering the function.
-
- To find out which QML file is causing a Qt Quick 2 application to crash,
- select \uicontrol {Load QML Stack} in the context menu in the
- \uicontrol Stack view. The debugger tries to retrieve the JavaScript stack
- from the stopped executable and prepends the frames to the C++ frames,
- should it find any. You can click a frame in the QML stack to open the QML
- file in the editor.
-
-//! [debugger-call-stack-trace]
-
-//! [debugger-locals]
+/*!
+ \page creator-locals-view.html
+ \if defined(qtdesignstudio)
+ \previouspage creator-breakpoints-view.html
+ \else
+ \previouspage creator-source-files-view.html
+ \endif
+ \nextpage creator-expressions-view.html
- \section1 Local Variables and Function Parameters
+ \title Local Variables and Function Parameters
- The Locals view consists of the \uicontrol Locals pane and the
+ The \uicontrol {Locals} view consists of the \uicontrol Locals pane and the
\uicontrol {Return Value} pane (hidden when empty).
- \image qtcreator-locals.png "Locals view"
+ \image qtcreator-locals.png {Locals view}
Whenever a program stops under the control of the debugger, it retrieves
information about the topmost stack frame and displays it in the
@@ -310,12 +325,18 @@
objects will be displayed. Select \uicontrol {Use dynamic object type for
display} in the context menu. Keep in mind that choosing the dynamic type
might be slower.
+*/
-//! [debugger-locals]
-
-//! [debugger-expressions]
+/*!
+ \page creator-expressions-view.html
+ \previouspage creator-locals-view.html
+ \if defined(qtdesignstudio)
+ \nextpage creator-qml-debugging-example.html
+ \else
+ \nextpage creator-registers-view.html
+ \endif
- \section1 Evaluating Expressions
+ \title Evaluating Expressions
To compute values of arithmetic expressions or function calls, use
expression evaluators in the \uicontrol Expressions view. To insert a new
@@ -324,7 +345,7 @@
\uicontrol {Add New Expression Evaluator} from the context menu, or drag and
drop an expression from the code editor.
- \image qtcreator-debugger-expressions.png
+ \image qtcreator-debugger-expressions.png {Expressions view}
\note Expression evaluators are powerful, but slow down debugger operation
significantly. It is advisable to not use them excessively, and to remove
@@ -336,16 +357,12 @@
The QML debugger can evaluate JavaScript expressions.
-//! [debugger-expressions]
-
-//! [debugger-expressions-cpp]
-
+ \if defined(qtcreator)
GDB, LLDB and CDB support the evaluation of simple C and C++ expressions.
- Functions can be called
- only if they are actually compiled into the debugged executable or a library
- used by the executable. Most notably, inlined functions such as most
- \c{operator[]} implementations of standard containers are typically \e{not}
- available.
+ Functions can be called only if they are actually compiled into the debugged
+ executable or a library used by the executable. Most notably, inlined
+ functions such as most \c{operator[]} implementations of standard containers
+ are typically \e{not} available.
When using GDB or LLDB as backend, a special ranged syntax can be used to
display multiple values with one expression. A sub-expression of form
@@ -357,31 +374,21 @@
value and type, you can examine and traverse the low-level layout of object
data.
- \table
- \row
- \li \b{Note:}
-
- \row
- \li GDB and LLDB, and therefore \QC's debugger, also work for optimized
- builds on Linux and \macos. Optimization can lead to re-ordering
- of instructions or removal of some local variables, causing the
- \uicontrol {Locals} and \uicontrol {Expressions} view to show
- unexpected data.
- \row
- \li The debug information from GCC does not include enough
- information about the time when a variable is initialized.
- Therefore, \QC can not tell whether the contents of a local
- variable are \e {real data} or \e {initial noise}. If a QObject
- appears uninitialized, its value is reported as
- \uicontrol {not in scope}. Not all uninitialized objects,
- however, can be recognized as such.
- \endtable
+ GDB and LLDB, and therefore \QC's debugger, also work for optimized
+ builds on Linux and \macos. Optimization can lead to re-ordering
+ of instructions or removal of some local variables, causing the
+ \uicontrol {Locals} and \uicontrol {Expressions} view to show
+ unexpected data.
- \note The set of evaluated expressions is saved in your session.
+ The debug information from GCC does not include enough
+ information about the time when a variable is initialized.
+ Therefore, \QC can not tell whether the contents of a local
+ variable are \e {real data} or \e {initial noise}. If a QObject
+ appears uninitialized, its value is reported as
+ \uicontrol {not in scope}. Not all uninitialized objects,
+ however, can be recognized as such.
-//! [debugger-expressions-cpp]
-
-//! [debugger-qt-basic-objects]
+ \note The set of evaluated expressions is saved in your session.
\section1 Inspecting Basic Qt Objects
@@ -419,6 +426,5 @@
You can enable tooltips in the main editor displaying this information.
For more information, see \l{See the value of variables in tooltips while debugging}.
-
-//! [debugger-qt-basic-objects]
+ \endif
*/
diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdocinc b/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc
index 0cf94c9f7d..b97be123a3 100644
--- a/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdocinc
+++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc
@@ -1,11 +1,12 @@
-// Copyright (C) 2021 The Qt Company Ltd.
+// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
+ \page creator-debugger-preferences.html
+ \previouspage creator-remote-debugging.html
+ \nextpage creator-debugging-helpers.html
-//! [debugger-settings]
-
- \section1 Specifying Debugger Settings
+ \title Debugger Preferences
To specify settings for managing debugger processes, select \uicontrol Edit
> \uicontrol Preferences > \uicontrol Debugger. In the \uicontrol General tab,
@@ -25,7 +26,7 @@
program, which effectively prevents storing debug output in
system logs.
- \section2 Mapping Source Paths
+ \section1 Mapping Source Paths
To enable the debugger to step into the code and display the source code
when using a copy of the source tree at a location different from the one
@@ -47,7 +48,7 @@
of the source tree on the local machine.
\endlist
- \section2 Specifying GDB Settings
+ \section1 Specifying GDB Settings
To specify settings for managing the GDB process, select \uicontrol Edit >
\uicontrol Preferences > \uicontrol Debugger > \uicontrol GDB.
@@ -133,7 +134,7 @@
To keep debugging all children after a fork, select the
\uicontrol {Debug all child processes} check box.
- \section2 Specifying CDB Settings
+ \section1 Specifying CDB Settings
To specify settings for managing the CDB process, select \uicontrol Edit >
\uicontrol Preferences > \uicontrol Debugger > \uicontrol CDB.
@@ -179,7 +180,7 @@
in \l Issues, select the check boxes
in the \uicontrol {Add Exceptions to Issues View} group.
- \section2 Setting CDB Paths on Windows
+ \section1 Setting CDB Paths on Windows
To obtain debugging information for the operating system libraries for
debugging Windows applications, add the Microsoft Symbol Server
@@ -202,6 +203,4 @@
To use the Source Server infrastructure for fetching missing source files
directly from version control or the web, enter the following string in
the \uicontrol {Source Paths} field: \c srv*.
-
-//! [debugger-settings]
*/
diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc
index 4e10efc30a..504eaa9087 100644
--- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc
+++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc
@@ -1,4 +1,4 @@
-// Copyright (C) 2021 The Qt Company Ltd.
+// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
// **********************************************************************
@@ -38,7 +38,8 @@
\li Debug Python source code - \c pdb.
\endlist
- For more information, see:
+ The following sections describe how to set up, launch, and interact with the
+ debugger:
\list
@@ -57,11 +58,34 @@
\key F5. Other, less common start options are available in the
\uicontrol Debug > \uicontrol {Start Debugging} menu.
- \li \l{Interacting with the Debugger}
+ \li \l{Debug Mode Views}
- You can use the tool views in the \uicontrol Debug mode to inspect the
+ Use the views in the \uicontrol Debug mode to inspect the
state of your application while debugging.
+ \li \l{Stopping Applications}
+
+ You can interrupt a running application before it terminates
+ or to find out why the application does not work correctly.
+ Set breakpoints to stop the application for examining and changing
+ variables, setting new breakpoints or removing old ones, and then
+ continue running the application.
+
+ \li \l{Examining Data}
+
+ You can examine variable values and data structures in detail.
+
+ \li \l{Remote Debugging}
+
+ You can debug an application that runs on a remote target with the
+ necessary helper processes also running.
+
+ \li \l{Debugger Preferences}
+
+ Specify preferences for managing debugger processes. You can specify
+ preferences that are common to all debuggers, or the native debugger
+ that you use, GDB or CDB.
+
\li \l{Using Debugging Helpers}
\QC is able to show complex data types in a customized,
@@ -107,9 +131,9 @@
(\uicontrol {Start Debugging of Startup Project}) button or press \key F5.
\QC checks whether the compiled program is up-to-date, and rebuilds and
- deploys it if the \uicontrol {Build before deploying} field is set to
- build the whole project or the application to run and the
- \uicontrol {Always deploy before running} check box is selected in
+ deploys it if you set the \uicontrol {Build before deploying} field to
+ build the whole project or the application to run and select he
+ \uicontrol {Always deploy before running} check box in
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run} >
\uicontrol General. To debug the program without deploying
it, select \uicontrol Debug > \uicontrol {Start Debugging} >
@@ -122,7 +146,7 @@
to execute before and after the backend and debugged program are started or
attached in \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger >
\uicontrol GDB and \uicontrol CDB. For more information, see
- \l{Specifying Debugger Settings}.
+ \l{Debugger Preferences}.
To allow reading the user's default .gdbinit file on debugger startup,
select the \uicontrol {Load .gdbinit file on startup} check box in
@@ -342,9 +366,14 @@
You can launch the debugger in the post-mortem mode if an application
crashes on Windows. Click the \uicontrol {Debug in \QC} button in the error
message that is displayed by the Windows operating system.
+*/
+/*!
+ \page creator-remote-debugging.html
+ \previouspage creator-debugger-examining-data.html
+ \nextpage creator-debugger-preferences.html
- \section1 Remote Debugging
+ \title Remote Debugging
\QC makes remote debugging easy.
In general, the remote debugging setup consist of a probe running on the
@@ -364,7 +393,7 @@
Special use cases, such as attaching to a running process on the target,
might still require manual setup.
- \section3 Using GDB
+ \section1 Using GDB
When debugging on a target supported by GDB server, a local GDB process
talks to a GDB server running on the remote machine that controls the
@@ -440,7 +469,7 @@
in GDB, see \l{https://sourceware.org/gdb/onlinedocs/gdb/Connecting.html}
{Debugging with GDB: Connecting to a Remote Target}.
- \section3 Using CDB
+ \section1 Using CDB
In remote mode, the local CDB process talks to a CDB process that runs on
the remote machine. The process is started with special command line options
@@ -515,17 +544,16 @@
\page creator-debug-mode.html
\if defined(qtdesignstudio)
\previouspage studio-debugging.html
- \nextpage creator-debugging-qml.html
\else
\previouspage creator-debugger-operating-modes.html
- \nextpage creator-debugging-helpers.html
\endif
+ \nextpage creator-stack-view.html
- \title Interacting with the Debugger
+ \title Debug Mode Views
- You can use the \QC \uicontrol Debug mode to inspect the state of your
- application while debugging. You can interact with the debugger in several
- ways, including the following:
+ In the \uicontrol Debug mode, you can inspect the state of your
+ application while debugging. You can interact with the debugger
+ in many ways, including the following:
\list
@@ -545,38 +573,99 @@
\li Examine the list of loaded shared libraries.
\li Disassemble sections of code.
-
- \omit
- \li Create snapshots of the current state of the debugged program
- and re-examine them later.
- \endomit
-
\endlist
\QC displays the raw information from 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 offered by stack view, views
+ In addition to the generic IDE functionality of the stack view, views
for locals and expressions, registers, and so on, \QC 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 extensions.
- This deeper understanding is used to present objects of such classes in a
+ It uses this deeper understanding to present objects of such classes in a
useful way.
- \section1 Using the Debugger
+ Interact with the program you are debugging in the following views.
+
+ \table
+ \header
+ \li View
+ \li Purpose
+ \li Learn More
+ \row
+ \li Stack
+ \li Examine the the nested function calls leading to the current position
+ as a call stack trace.
+ \li \l {Viewing Call Stack Trace}
+ \row
+ \li Breakpoints
+ \li Set \e {breakpoints} with conditions make the application stop in
+ a controlled way. A \e {watchpoint} stops the application when the
+ value of an expression changes.
+ \li \l {Setting Breakpoints}
+ \row
+ \li Threads
+ \li Switch between threads.
+ \li \l {Viewing Threads}
+ \row
+ \li Modules
+ \li View information about modules included in the application.
+ \li \l {Viewing Modules}
+ \row
+ \li Source Files
+ \li View a list of source files included in the project.
+ \li \l {Viewing Source Files}
+ \row
+ \li Locals
+ \li View information about the parameters of the function in the topmost
+ stack frame and local variables.
+ \li \l {Local Variables and Function Parameters}
+ \row
+ \li Expressions
+ \li Compute values of arithmetic expressions or function calls.
+ \li \l {Evaluating Expressions}
+ \row
+ \li Registers
+ \li View the current state of the CPU registers to examine the
+ application at the machine level.
+ \li \l {Viewing and Editing Register State}
+ \row
+ \li Peripheral Registers
+ \li View the current state of peripheral registers.
+ \li
+ \row
+ \li Debugger Log
+ \li View debug output to find out why the debugger does not work.
+
+ The log view acts as a console, so you can send the contents
+ of the line under the text cursor in the log directly to the
+ native debugger.
+ \li \l{Troubleshooting Debugger}
+
+ \l {Directly Interacting with Native Debuggers}
+ \row
+ \li Disassembler
+ \li View disassembled code for the current function.
+ \li \l {Viewing Disassembled Code}
+ \row
+ \li Editor
+ \li Open the current source file in the text editor for changing it.
+ \li \l {Working in Edit Mode}
+ \endtable
- In \uicontrol Debug mode, you can use several views to interact with the
- program you are debugging. The availability of views depends on whether
+ \section1 Managing Debug Views
+
+ The availability of views depends on whether
you are debugging C++ or QML. Frequently used views are shown by
default and rarely used ones are hidden. To change the default settings,
select \uicontrol View > \uicontrol Views, and then select views to
display or hide. Alternatively, you can enable or disable views from the
- context menu of the title bar of any visible debugger view.
+ context menu of the title bar of any visible debug mode view.
- \image qtcreator-debugger-views.png "Debug mode views"
+ \image qtcreator-debugger-views.png {Debug mode views}
You can drag and drop the views in \QC to new positions on the screen. The
size and position of views are saved for future sessions. Select
@@ -589,6 +678,31 @@
To show and hide columns in views, toggle \uicontrol {Show Column} in
the context menu.
+ \section1 Customizing Debug Views
+
+ You can change the appearance and behavior of the debug views by specifying
+ settings in \uicontrol Preferences > \uicontrol Debugger. For example, you can:
+
+ \list
+ \li Use alternating row colors in debug views.
+ \li Adopt font size changes from the main editor.
+ \li Have tooltips displayed in the main editor while you are debugging.
+ \li Close temporary source and memory views and switch to the previously
+ used \QC mode when the debugger exits.
+ \li Bring \QC to the foreground when the debugged application is
+ interrupted.
+ \endlist
+
+ For more information, see \l{Debugger Preferences}.
+*/
+
+/*!
+ \page creator-debugger-stopping.html
+ \previouspage creator-disassembler-view.html
+ \nextpage creator-debugger-examining-data.html
+
+ \title Stopping Applications
+
Once the program starts running under the control of the debugger, it
behaves and performs as usual. You can interrupt a running C++ program by
selecting \uicontrol Debug > \uicontrol Interrupt. The program is
@@ -598,20 +712,30 @@
\list
- \li Retrieves data representing the call stack at the program's current
- position.
+ \li Retrieves data representing the \l{Viewing Call Stack Trace}
+ {call stack} at the program's current position.
- \li Retrieves the contents of local variables.
+ \li Retrieves the contents of \l{Local Variables and Function Parameters}
+ {local variables}.
- \li Examines \uicontrol Expressions.
+ \li Examines \l{Evaluating Expressions}{expressions}.
- \li Updates the \uicontrol Registers, \uicontrol Modules, and
- \uicontrol Disassembler views if you are debugging the C++ based
- applications.
+ \li Updates the \l{Viewing and Editing Register State}{Registers},
+ \l{Viewing Modules}{Modules}, and \l{Viewing Disassembled Code}
+ {Disassembler} views if you are debugging C++ based applications.
\endlist
+*/
+
+/*!
+ \page creator-debugger-examining-data.html
+ \previouspage creator-debugger-stopping.html
+ \nextpage creator-remote-debugging.html
+
+ \title Examining Data
- You can use the \uicontrol Debug mode views to examine the data in more detail.
+ Use the \l {Debug Mode Views}{Debug mode views} to examine the data in more
+ detail.
You can use the following keyboard shortcuts:
@@ -638,10 +762,10 @@
\endlist
- It is also possible to continue executing the program until the current
+ You can continue executing the program until the current
function completes or jump to an arbitrary position in the current function.
- \section2 Stepping Into Code
+ \section1 Stepping Into Code
When using GDB as the debugging backend, you can compress several steps
into one step for less noisy debugging. For more information, see
@@ -651,45 +775,9 @@
but this option should be used with care, as it is slow and unstable on the
GDB side. For more information, see \l{Specifying GDB Settings}.
- \section2 Customizing Debug Views
-
- You can change the appearance and behavior of the debug views by specifying
- settings in \uicontrol Preferences > \uicontrol Debugger. For example, you can:
-
- \list
- \li Use alternating row colors in debug views.
- \li Adopt font size changes from the main editor.
- \li Have tooltips displayed in the main editor while you are debugging.
- \li Close temporary source and memory views and switch to the previously
- used \QC mode when the debugger exits.
- \li Bring \QC to the foreground when the debugged application is
- interrupted.
- \endlist
-
- For more information, see \l{Specifying Debugger Settings}.
-
- \include creator-debugger-common.qdocinc debugger-breakpoints
- \include creator-debugger-common.qdocinc debugger-call-stack-trace
- \include creator-debugger-common.qdocinc debugger-locals
- \include creator-debugger-common.qdocinc debugger-expressions
\include creator-debugger-common.qdocinc debugger-expressions-cpp
\include creator-debugger-common.qdocinc debugger-qt-basic-objects
- \section1 Directly Interacting with Native Debuggers
-
- In some cases, it is convenient to directly interact with the command line
- of the native debugger. In \QC, you can use the left pane of the
- \uicontrol {Debugger Log} view for that purpose. When you press
- \key {Ctrl+Enter}, the contents of the line under the text cursor are sent
- directly to the native debugger. Alternatively, you can use the line edit at
- the bottom of the view. Output is displayed in the right pane of the
- \uicontrol {Debugger Log} view.
-
- \note Usually, you do not need this feature because \QC offers better ways to
- handle the task. For example, instead of using the GDB
- \c print command from the command line, you can evaluate an expression in
- the \uicontrol {Expressions} view.
-
\section1 Debugging C++ Based Applications
The following sections describe additional debugging functions that apply
@@ -726,14 +814,45 @@
\uicontrol {Use debug versions of Frameworks} option in the project run
settings.
- \section2 Viewing Threads
+ \omit
+ \section2 Creating Snapshots
+
+ A snapshot has the complete state of the debugged program at a time,
+ including the full memory contents.
+
+ To create snapshots of a debugged program, select \uicontrol {Create Snapshot}
+ in the context menu in the \uicontrol {Debugger Perspectives} view.
+
+ Double-click on entries in the \uicontrol {Debugger Perspectives} view to
+ switch between snapshots. The debug mode views are updated to reflect the state
+ of the program at time of taking the snapshot.
+
+ \note Creating snapshots involves creating core files of the debugged process,
+ requiring significant amount of disk space. For details, see
+ \l{https://sourceware.org/gdb/onlinedocs/gdb/Core-File-Generation.html}.
+
+ \endomit
+*/
+
+/*!
+ \page creator-threads-view.html
+ \previouspage creator-breakpoints-view.html
+ \nextpage creator-modules-view.html
+
+ \title Viewing Threads
If a multi-threaded program is interrupted, the \uicontrol Threads view or
the combobox named \uicontrol Threads in the debugger status bar can be used
to switch from one thread to another. The \uicontrol Stack view adjusts
itself accordingly.
+*/
+
+/*!
+ \page creator-modules-view.html
+ \previouspage creator-threads-view.html
+ \nextpage creator-source-files-view.html
- \section2 Viewing Modules
+ \title Viewing Modules
The \uicontrol Modules view displays information that the debugger plugin
has about modules included in the application that is being debugged. A
@@ -768,8 +887,14 @@
for the specified modules, select \uicontrol Edit > \uicontrol Preferences >
\uicontrol Debugger > \uicontrol CDB. For more information, see
\l{Specifying CDB Settings}.
+*/
+
+/*!
+ \page creator-source-files-view.html
+ \previouspage creator-modules-view.html
+ \nextpage creator-locals-view.html
- \section2 Viewing Source Files
+ \title Viewing Source Files
The \uicontrol {Source Files} view lists all the source files included in
the project. If you cannot step into an instruction, you can check whether
@@ -785,27 +910,14 @@
paths. For more information, see \l{Mapping Source Paths}.
By default, the \uicontrol {Source Files} view is hidden.
+*/
- \section2 Viewing Disassembled Code
-
- The \uicontrol Disassembler view displays disassembled code for the current
- function.
-
- The \uicontrol Disassembler view is useful for low-level commands for checking
- single instructions, such as \uicontrol {Step Into} and \uicontrol {Step Over}.
- By default, the \uicontrol Disassembler view is hidden.
-
- To access the \uicontrol Disassembler view, check
- \uicontrol Debug > \uicontrol {Operate by Instruction} while the debugger is
- running. Alternatively, click the
- \inlineimage icons/debugger_singleinstructionmode.png
- (\uicontrol {Operate by Instruction}) tool button on the debugger tool bar.
-
- By default, GDB shows AT&T style disassembly. To switch to the Intel style,
- select \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger >
- \uicontrol GDB > \uicontrol {Use Intel style disassembly}.
+/*!
+ \page creator-registers-view.html
+ \previouspage creator-expressions-view.html
+ \nextpage creator-debugger-log-view.html
- \section2 Viewing and Editing Register State
+ \title Viewing and Editing Register State
The \uicontrol Registers view displays the current state of the CPU registers.
Depending on the CPU type, there will be different registers available. The
@@ -818,32 +930,56 @@
if the register is displayed expanded.
By default, the \uicontrol Registers view is hidden.
+*/
- \omit
- \section2 Creating Snapshots
+/*!
+ \page creator-debugger-log-view.html
+ \previouspage creator-registers-view.html
+ \nextpage creator-disassembler-view.html
- A snapshot has the complete state of the debugged program at a time,
- including the full memory contents.
+ \title Directly Interacting with Native Debuggers
- To create snapshots of a debugged program, select \uicontrol {Create Snapshot}
- in the context menu in the \uicontrol {Debugger Perspectives} view.
+ In some cases, it is convenient to directly interact with the command line
+ of the native debugger. In \QC, you can use the left pane of the
+ \uicontrol {Debugger Log} view for that purpose. When you press
+ \key {Ctrl+Enter}, the contents of the line under the text cursor are sent
+ directly to the native debugger. Alternatively, you can use the line edit at
+ the bottom of the view. Output is displayed in the right pane of the
+ \uicontrol {Debugger Log} view.
- Double-click on entries in the \uicontrol {Debugger Perspectives} view to
- switch between snapshots. The debugger views are updated to reflect the state
- of the program at time of taking the snapshot.
+ \note Usually, you do not need this feature because \QC offers better ways to
+ handle the task. For example, instead of using the GDB
+ \c print command from the command line, you can evaluate an expression in
+ the \uicontrol {Expressions} view.
+*/
- \note Creating snapshots involves creating core files of the debugged process,
- requiring significant amount of disk space. For details, see
- \l{https://sourceware.org/gdb/onlinedocs/gdb/Core-File-Generation.html}.
+/*!
+ \page creator-disassembler-view.html
+ \previouspage creator-debugger-log-view.html
+ \nextpage creator-debugger-stopping.html
- \endomit
+ \title Viewing Disassembled Code
- \include creator-debugger-settings.qdocinc debugger-settings
-*/
+ The \uicontrol Disassembler view displays disassembled code for the current
+ function.
+ The \uicontrol Disassembler view is useful for low-level commands for checking
+ single instructions, such as \uicontrol {Step Into} and \uicontrol {Step Over}.
+ By default, the \uicontrol Disassembler view is hidden.
+
+ To access the \uicontrol Disassembler view, check
+ \uicontrol Debug > \uicontrol {Operate by Instruction} while the debugger is
+ running. Alternatively, click the
+ \inlineimage icons/debugger_singleinstructionmode.png
+ (\uicontrol {Operate by Instruction}) tool button on the debugger tool bar.
+
+ By default, GDB shows AT&T style disassembly. To switch to the Intel style,
+ select \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger >
+ \uicontrol GDB > \uicontrol {Use Intel style disassembly}.
+*/
/*!
- \previouspage creator-debug-mode.html
+ \previouspage creator-debugger-preferences.html
\page creator-debugging-helpers.html
\nextpage creator-debugging-qml.html
diff --git a/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc b/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc
index e63d09443a..797788897a 100644
--- a/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc
+++ b/doc/qtcreator/src/debugger/qtquick-debugger-example.qdoc
@@ -10,7 +10,7 @@
/*!
\page creator-qml-debugging-example.html
\if defined(qtdesignstudio)
- \previouspage creator-debugging-qml.html
+ \previouspage creator-expressions-view.html
\nextpage creator-qml-performance-monitor.html
\else
\previouspage creator-debugging-example.html
diff --git a/doc/qtcreator/src/debugger/qtquick-debugging.qdoc b/doc/qtcreator/src/debugger/qtquick-debugging.qdoc
index 95259d6605..833cbe69c4 100644
--- a/doc/qtcreator/src/debugger/qtquick-debugging.qdoc
+++ b/doc/qtcreator/src/debugger/qtquick-debugging.qdoc
@@ -11,7 +11,7 @@
\page creator-debugging-qml.html
\if defined(qtdesignstudio)
\previouspage studio-debugging.html
- \nextpage creator-qml-debugging-example.html
+ \nextpage creator-stack-view.html
\else
\previouspage creator-debugging-helpers.html
\nextpage creator-debugging-example.html
@@ -158,10 +158,10 @@
\list
- \li \l{Setting Breakpoints}{Setting breakpoints}
-
\li \l{Viewing Call Stack Trace}{Viewing call stack trace}
+ \li \l{Setting Breakpoints}{Setting breakpoints}
+
\li \l{Local Variables and Function Parameters}
{Viewing local variables and function parameters}
@@ -169,13 +169,6 @@
\endlist
- \if defined(qtdesignstudio)
- \include creator-debugger-common.qdocinc debugger-breakpoints
- \include creator-debugger-common.qdocinc debugger-call-stack-trace
- \include creator-debugger-common.qdocinc debugger-locals
- \include creator-debugger-common.qdocinc debugger-expressions
- \endif
-
\section1 Inspecting Items
While the application is running, you can use the \uicontrol {Locals}