aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2017-08-17 13:53:18 +0200
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2017-08-17 12:43:16 +0000
commita951448c4dceca637992ea29df832de190f22130 (patch)
treed5ac7f4d9de2583b73abdf08db3fb2b50c3d7bdc
parenta4aa79a4f8da10256e923bca8fa4403436ea64dc (diff)
Doc: Add step list for adding custom debugging helpers
Change-Id: I01aba948b9dfd55a58cae5fdd51e1588bb675e6a Task-number: QTCREATORBUG-18740 Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--doc/images/qtcreator-debugging-helper-options.pngbin0 -> 46233 bytes
-rw-r--r--doc/src/debugger/creator-debugger.qdoc51
-rw-r--r--share/qtcreator/debugger/personaltypes.py4
3 files changed, 43 insertions, 12 deletions
diff --git a/doc/images/qtcreator-debugging-helper-options.png b/doc/images/qtcreator-debugging-helper-options.png
new file mode 100644
index 0000000000..d4c635b0b8
--- /dev/null
+++ b/doc/images/qtcreator-debugging-helper-options.png
Binary files differ
diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc
index 9d4d8aa836..8812b0a06c 100644
--- a/doc/src/debugger/creator-debugger.qdoc
+++ b/doc/src/debugger/creator-debugger.qdoc
@@ -981,6 +981,8 @@
Linux, LLDB on macOS, and CDB on Windows, or any other platform on which at
least one of the three supported backends is available.
+ \section2 Adding Custom Debugging Helpers
+
To add debugging helpers for your own types, no compilation is required,
just adding a few lines of Python. The scripts can address multiple versions
of Qt, or of your own library, at the same time.
@@ -991,6 +993,45 @@
\uicontrol {Additional Startup Commands} in \uicontrol Tools >
\uicontrol Options > \uicontrol Debugger > \uicontrol GDB.
+ To get started with implementing debugging helpers for your own data types,
+ you can put their implementation into the file
+ \c share/qtcreator/debugger/personaltypes.py in your \QC installation. The
+ file contains one example implementation:
+
+ \quotefromfile ../../share/qtcreator/debugger/personaltypes.py
+ \skipto qdump__
+ \printuntil d.putItem
+
+ To add debugging helpers:
+
+ \list 1
+
+ \li Open the \c share/qtcreator/debugger/personaltypes.py file for
+ editing. For example, if your Qt installation is located in the
+ \c Qt5 directory on Windows, look in
+ \c C:\Qt5\Tools\QtCreator\share\qtcreator\debugger.
+
+ \li Add your dumper implementation to the end of the \c personaltypes.py
+ file. For more information about implementing debugging helpers,
+ see the following sections.
+
+ \li To prevent \c personaltypes.py from being overwritten when you
+ update your \QC installation (when updating your Qt installation,
+ for example), copy it to a safe location outside the \QC
+ installation in your file system and specify the location in
+ \uicontrol Tools > \uicontrol Options > \uicontrol Debugger >
+ \uicontrol {Locals & Expressions} >
+ \uicontrol {Extra Debugging Helpers}.
+
+ \image qtcreator-debugging-helper-options.png
+
+ \endlist
+
+ The custom debugging helpers will be automatically picked up from
+ \c personaltypes.py when you start a debugging session in \QC or select
+ \uicontrol {Reload Debugging Helpers} from the context menu of the
+ \uicontrol {Debugger Log} view.
+
\section2 Debugging Helper Overview
The implementation of a debugging helper typically consists of a single
@@ -1069,16 +1110,6 @@
d.putArrayData(base, size, typeobj)
\endcode
- To get started with implementing debugging helpers for your own data types,
- it is possible to put their implementation into the file
- share/qtcreator/debugger/personaltypes.py in your \QC installation.
-
- They will be automatically picked up from there each time you start a
- debugging session in \QC and whenever you select
- \uicontrol {Reload Debugging Helpers} from the context menu of the
- \uicontrol {Debugger Log} view.
-
-
\section2 Debugging Helper Implementation
A debugging helper creates a description of the displayed data item
diff --git a/share/qtcreator/debugger/personaltypes.py b/share/qtcreator/debugger/personaltypes.py
index 1264361e24..b4d34db10c 100644
--- a/share/qtcreator/debugger/personaltypes.py
+++ b/share/qtcreator/debugger/personaltypes.py
@@ -31,8 +31,8 @@
#
# To add dumpers that don't get overwritten, copy this file here
# to a safe location outside the Qt Creator installation and
-# make this location known to Qt Creator using the Debugger /
-# GDB / Dumper customization / Additional file setting.
+# make this location known to Qt Creator using the Debugger >
+# Locals & Expressions > Extra Debugging Helpers setting.
# Example to display a simple type
# template<typename U, typename V> struct MapNode