It can then be queried in debugger python scripts to detect that the
debugger process was launched by Qt Creator.
Task-number: QTCREATORBUG-31769
Change-Id: I7d46ff8bb0312be98ff3cdd5bab9c97e4de6164b
Reviewed-by: hjk <hjk@qt.io>
The channels can be extracted directly once the PortGatherer
is finished, before the start() of the RunWorkerTree.
Also, manager the one debug and one qml channel for the whole
runworker tree centrally in RunControl.
There is quite some potential for clean up left.
Change-Id: I2d877d34958cb67aa324c9b5a6f1529872b74b16
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use a suitable amount of individual SubChannelProviders instead.
Remove the lumping of the perf channel and gdb/lldb channel in the
users.
Change-Id: I47d449e933799e1a10df4801dfbe99653f168f56
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The PortsGatherer runworker was used in all remote setups plus local QML
tooling and injected in various ways into the tree of runworkers.
Having this centrally reduces complexity downstream.
Change-Id: I8e08a942209f5458fbdd5c9e286d05979beb8a40
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Try to simplify the structure. Lumping them together is not really needed.
Change-Id: Ie31411448f66df29326219bcf652fb3da16a54bd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Replace it with a plain (optional) Process in the main debugger
startup sequence.
Change-Id: I9b67bc99625aba68a923a362fc5bf9be828a8fb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and move its setup to a time when the ports are known.
This doesn't fix the console-for-Qml problem but simplifies
the code and puts port gathering -> terminal start ->
application start in the right order.
No change in functionality intended.
Change-Id: I0b3ecc24251106b31c854d94ab7bf2f3e4a9af69
Reviewed-by: David Schulz <david.schulz@qt.io>
Avoid sharing the workers with the engine creating the
snapshot to avoid closing both when stopping the debugger
engine for the snapshot.
Correctly detach at finish to avoid having a runcontrol
appearing still running.
Fixes: QTCREATORBUG-31220
Change-Id: Iccb54b0fc2d7f5bf54b42a116e56c1a840b1f46e
Reviewed-by: hjk <hjk@qt.io>
Ctrl+C events are only handled properly for console applications. When
gdb debugs a GUI application the CTRL+C events are not handled. This can
be even reproduced with a plain gdb started from CMD.
This partially reverts commit 9d88da6c2b
and 670b4ec729.
Fixes: QTCREATORBUG-31131
Change-Id: I11c9d9dc08b4dbe450f38e27559b130dd317b675
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This would allow manual registration of a GDB/LLDB DAP debugger from a
CMake configure preset as follows:
```
"vendor": {
"qt.io/QtCreator/1.0": {
"debugger": {
"DisplayName": "LLDB Dap 18.1.7 Debugger",
"Abis": ["arm-darwin-generic-mach_o-64bit"],
"Binary": "/Users/cristian/llvm/clang/bin/lldb-dap",
"EngineType": 1024,
"Version": "18.1.7"
}
}
}
```
This way I can configure a project with a toolchain that uses a DAP
debugger (not every gdb/lldb has python bindings) and have debugging
working out of the box.
Change-Id: Id9bff26b6544b7af99caccb18cdbe0edb334218a
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
lldb has a dap interface since a while now. The "GDB Dap" preset is not
compatible, since gdb uses the same executable and lldb has a "lldb-dap"
(previously "lldb-vscode") executable.
Change-Id: I4105223659de093f0ee44129527c4830d21a3090
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
... when there is more than one engine.
Mildly-related-to: QTCREATORBUG-30355
Change-Id: Idaf41b97f51c384ccf6a437d9c9c8dec922affc6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This feature is needed to enable debugging on remote targes which can
not expose gdbserver ports on the wild, and we must use ssh tunneling
for that job.
Change-Id: I6df712fd3b40790e89c79a7617a24430fde6805a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Rename process.h back to qtcprocess.h
MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.
There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have
Simply use a name that doesn't conflict.
Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This does not yet fix the reported problem but at least attaches and
gives a working QML inspector in a QML-only debugging session.
Task-number: QTCREATORBUG-30263
Change-Id: Ieac517c2b7c5dde24792f3bbcffe0058073ddbd1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It's the "persisted" form of the content of the original aspect's data,
calling it 'aspect' already confused me a few times.
Change-Id: I88a6f76f0ca39d3d36dde9b84287032ceecf7033
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
"SourcePath" was meant to be set by the installer to make it easier
to find the installed source folder for a specific Qt version. This was
never implemented in the Installer and a workaround was later
created for it.
This patch removes the dead code.
Change-Id: I1c2f5c10e37a7df4643327d1071db9e2e62c8212
Reviewed-by: David Schulz <david.schulz@qt.io>
Instead of relying on the DebuggerRunWorkerFactory to match for all
RunConfiguration, every plugin needs to create a WorkerFactory for
its own RunConfiguration.
Similar to the SimpleTargetRunnerFactory there is now a
SimpleDebugRunnerFactory which makes the setup easy.
Change-Id: I25aaabcd70f7ac649baeab4eb4c7e88d53dac91e
Reviewed-by: hjk <hjk@qt.io>
They are already added by the Python run configuration.
Change-Id: Icfea32e00209a690901cf672a17a8ef5c23b909d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The pdb engine is created in the DebuggerRunTool constructor so we
cannot unconditionally overwrite the engine in DebuggerRunTool::start.
Amends 9af8ecd935
Change-Id: I0c3c88d14235bfb01543da788a7bb5e7e99018d3
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Added Python support to the DAP engine in Qt Creator.
Note:
Locals aren't displayed for python. It will be fixed
in the following commit.
Change-Id: I6d3b41fecc98b92951ed0522e9201401293034d7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit refactors the Debug Adapter Protocol (DAP) engine
to separate the logic for CMake-based projects and Gdb-based
debugging.
- Moved CMake-specific code to a new CMakeDAPEngine class
- Moved Gdb-specific code to a new GdbDAPEngine class
Change-Id: Ia616e7b7ea2ff2071bcadd26b28b620f9aca6ac4
Reviewed-by: hjk <hjk@qt.io>
This commit introduces the capability to initiate
CMake Debug sessions directly from the debug panel
in the QtCretor.
Change-Id: I00245e0e14aded378e881c4049cdc41dd1fbd00e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
When hovering an entry in the filter menu in the Issues view.
Also remove some categories that shouldn't be there.
Change-Id: Ifb367d69b9396c2fdc45b83ec5ffd88ac2f0eda7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Added CMake support to the DAP engine in Qt Creator.
This feature can be enabled by setting the environment
variable QTC_USE_CMAKE_DEBUGGER. CMake debug session can
be started by clicking "Run CMake" or "Run".
Note:
Doesn't work with "Run debugging" in this patch.
Works only with cmake 3.27.0 and newer.
Change-Id: I756ea57f507aa4a6621ad62a8c0ef52c44a5185d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This reverts 67607e4bc6, which seems
not needed anymore.
Change-Id: I7c995fc158bb26acf3b4a8ad4b810fa427fcf009
Reviewed-by: David Schulz <david.schulz@qt.io>
The only difference between initiateFinish() and initiateStop()
is that the initiateFinish() deletes the RunControl automatically
after the final state was reached.
Add setAutoDeleteOnStop() property and reuse initiateStop()
and stopped() instead.
Change-Id: I8e842978831b19587a8658b4443c96a04eb7a6df
Reviewed-by: hjk <hjk@qt.io>
No need to set args just to delete them again.
Change-Id: Ib97d327329a25cb907227feb22db2334908ef089
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>