Commit Graph

383 Commits

Author SHA1 Message Date
Eike Ziller
8826a8b47b Merge remote-tracking branch 'origin/13.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: I2a3d92a14e4dd16897d19f7d8a8c7b0ec30d14a5
2024-02-19 14:44:54 +01:00
hjk
04d7f63186 Debugger: Fix Attach to QML Port
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>
2024-02-19 13:21:08 +00:00
hjk
7c5a0e6bb2 Rename RunControl::aspect to RunControl::aspectData
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>
2024-02-16 10:21:15 +00:00
Dominik Holland
8f2d0dbcc9 Introduce a function to register all local run configs
Change-Id: I936fb4e970f04859ba19eb0ecf2dee1c1ce758d8
Reviewed-by: hjk <hjk@qt.io>
2024-02-01 15:58:31 +00:00
hjk
8adbb1ddab Debugger: Allow debugging of custom executables again
Amends c81efc39c.

Change-Id: I5f816371d8f08ffb127ba39891b2c5b8f7df7f20
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
2024-01-30 08:16:45 +00:00
Marcus Tillmanns
f5934d69de QtSupport: Remove dead code
"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>
2024-01-17 13:50:19 +00:00
Dominik Holland
c81efc39c8 Create RunConfiguration specific DebugWorkerFactories
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>
2024-01-17 10:17:41 +00:00
Eike Ziller
2e280e1c50 Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/clangcodemodel/clangdfollowsymbol.cpp
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/miniprojecttargetselector.cpp

Change-Id: I45b7fee1a1d784c44f2139fb1ede69190d23d6fd
2023-12-06 16:50:15 +01:00
Friedemann Kleint
5b28043d46 pdb: Fix duplication of command line arguments
They are already added by the Python run configuration.

Change-Id: Icfea32e00209a690901cf672a17a8ef5c23b909d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-06 12:32:57 +00:00
David Schulz
eb740bdd95 Debugger: add python debugger setting in run configuration
Change-Id: Ifa5d72566007e0bb006523433dcef97689677fbf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-04 14:56:27 +00:00
David Schulz
09e94ae4ac Python: use kits page in python wizards
Change-Id: I1f7aaf145443481546abb868c8c167186600b848
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-28 12:17:14 +00:00
hjk
3bbda8f9da ProjectExplorer: Rename Tool{C,c}hainKitAspect
Change-Id: I74460b6402ab00f972c208023f03fac617982a11
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-27 13:35:28 +00:00
David Schulz
72a8e2e644 Python: fix pdb debugging
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>
2023-11-21 13:43:24 +00:00
Artem Sokolovskii
9af8ecd935 DAP: Fix dap engine selection with the translated strings
Change-Id: I051c1f7e9776922a98f7c54676c237c63984050d
Reviewed-by: hjk <hjk@qt.io>
2023-10-04 12:36:00 +00:00
Artem Sokolovskii
cecf577dc4 DAP: Add Python debugging
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>
2023-08-31 08:06:03 +00:00
Artem Sokolovskii
d304e82e63 DAP: Add engine chooser
The Engine Chooser empowers users to select the desired
debugging engine when initiating DAP debugging sessions.

Change-Id: I070ff2620b318494ee715c5ac369765d4a9dc616
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-28 15:29:42 +00:00
Jarek Kobus
121d73b30f Utils: Rename ProjectExplorer::Runnable into Utils::ProcessRunData
Move it into Utils lib.

Change-Id: I3b6c16d18439cabddf59afc03116f13c1970102c
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 07:44:34 +00:00
hjk
2a07253a42 Debugger: Rename debuggerkitinformation.{cpp,h}
... to debuggerkitaspect.{cpp,h}

Change-Id: Ia6316fcdc893ca066933658a52c78ef1587a76e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-16 07:33:43 +00:00
hjk
aa25fdcc69 QtSupport: Rename qtkitinformation.{h,cpp} -> qtkitaspect.{h,cpp}
Change-Id: I12229e5e98b468101d32edd35be74bbda0921d89
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 08:59:52 +00:00
Artem Sokolovskii
1836b50f5d DAP: Separate CMake and Gdb logic in DAP engine
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>
2023-08-08 14:15:30 +00:00
Jarek Kobus
be0e0490af DebuggerRunTool: Remove unused methods
Change-Id: I9f55e79bc202eedbf594100155fc18fedaf7b814
Reviewed-by: hjk <hjk@qt.io>
2023-07-21 13:44:14 +00:00
Artem Sokolovskii
4a0a6f07e7 DAP: Fix start CMake debug mode
Change-Id: I2951142736b0e6ccf2b08a7bd78b08b1e96bca6f
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 09:46:20 +00:00
Artem Sokolovskii
cd6e990de8 DAP: Add CMake debug to the debug panel
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>
2023-07-14 08:47:01 +00:00
hjk
a5e773aeee Debugger: Adapt to latest settings access style
Change-Id: I14f737612b4fe6a37e650190b587ef0b04e559ea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-14 08:39:08 +00:00
Eike Ziller
77c7e26779 Tasks: Show tool tips with information about the categories
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>
2023-07-13 06:09:27 +00:00
Marcus Tillmanns
77edffe3cf Debugger: Support linux remote debugging with LLDB
Adds support for Linux remote debugging with lldb-server

Change-Id: I3ee08704a3116030111df75273a46a2e4888f98e
Reviewed-by: hjk <hjk@qt.io>
2023-07-06 14:22:50 +00:00
Artem Sokolovskii
1fc0ca5277 DAP: Add CMake support to DAP engine
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>
2023-07-05 06:59:49 +00:00
hjk
e1c97d4e47 Debugger: Remove some path mapping
This reverts 67607e4bc6, which seems
not needed anymore.

Change-Id: I7c995fc158bb26acf3b4a8ad4b810fa427fcf009
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-07-04 10:35:02 +00:00
Jarek Kobus
c1f6d70445 RunControl: Remove initiateFinish() / finished()
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>
2023-07-04 07:29:23 +00:00
Marcus Tillmanns
31c6ff495a Debugger: Fix remote debugging macosx apps
Change-Id: I5328069ba9b82bb66dfa2c1e0d148a717d594a4b
Reviewed-by: hjk <hjk@qt.io>
2023-06-23 11:57:34 +00:00
hjk
26ef870761 Debugger: Somewhat more direct server command construction
No need to set args just to delete them again.

Change-Id: Ib97d327329a25cb907227feb22db2334908ef089
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-23 11:50:13 +00:00
hjk
ae33199d04 Debugger: Use CommandLine to set up debugger server
To allow more complex actions in the command line,
like parsing $SSH_CLIENT.

Change-Id: Ifc48a74f1fe4e42cd7ceddfd3c308bd1636212a7
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-23 08:20:01 +00:00
Eike Ziller
562c5774e3 Debugger: Fix automatic source mapping for Qt
- The QtVersion::sourcePath() was wrong because QT_INSTALL_PREFIX/src
  doesn't return the right path. Work around by checking if sources are
  found, and otherwise trying the location that we know the installers
  to put them.
- Pass the sourcePath along to the debugger run control, and use that
  instead of looking for qmake in the PATH (which fails because it is
  not in PATH).

Fixes: QTCREATORBUG-28950
Change-Id: Iffa262d6c87dbc979c449d43cd4a85e1320bcd37
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-16 07:15:16 +00:00
hjk
d740a355bb Utils: Rework CheckableMessageBox
Remove function overloads, thes are hard to read, to use and to extend.
I'd even argue this should be a plain default ctor and a few setters +
exec(), pretty much like Process::start() nowadays.

Move "decider" magic into a structure that can be filled ad-hoc outside
checkablemessagebox.cpp paving the ground for:

...removing  aspect dependency from CheckableMessageBox, Instead, add a
convenience function to BoolAspect.  Arguably, the latter is not needed
and could be done on the user side.

Use pointers instead of mutable references for in-out parameter.
Makes the "specialness" visible on the user side.

Pass ICore::settings() centrally as done elsewhere to reduce line noise
on the user side.

Change-Id: Ibb366353d1ea35401723fd05ce05672617a0a8fd
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-22 06:40:13 +00:00
Marcus Tillmanns
1fc2459b62 Utils: Unify CheckableMessageBox and make it look more native
Change-Id: I5690c16f38cfd2058e01441283bec28d44cadf75
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 08:01:13 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
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>
2023-05-04 05:52:16 +00:00
hjk
46b9cd952a Debugger: Add skeleton for a debugger adapter protocol using engine
- Support the launch of an application
- Support continue/pause an application
- Support add breakpoint only after an app is launched
(I.e. preset breakpoints won't work)
- Support stop the debug session
- "Remove one break breakpoint" works but removes all breakpoints

ToDo:
- Polish the transition between stages
- Fix breakpoints handling
- Add support "Step in", "Step out" and "Step Over"

Task-number: QTCREATORBUG-27279
Change-Id: I5c32ce713f5a0f19cc3b9d995cbbadd8adf6a413
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-06 13:04:43 +00:00
Marcus Tillmanns
3cd5e32e9c Debugger: Start debugserver for remote macOS
Change-Id: I5f713892dfbaaaecb7459c288df109bfe337f891
Reviewed-by: hjk <hjk@qt.io>
2023-04-06 07:14:45 +00:00
hjk
de546ff3ec Debugger: Support piping dumpers into gdb
This allows using dumpers available on the host being used from
remotely running gdb. No lldb/cdb yet.

Task-number: QTCREATORBUG-29000
Task-number: QTCREATORBUG-16246
Change-Id: Ib1a40a8c0284dcf41e8800d70ca3e632c699b2fa
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 06:26:11 +00:00
hjk
305ccfe259 Utils: Replace FilePath::onDevice() by new FilePath::withMappedPath()
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order
of b.withNewPath(a).

Whether the (curretly docker-specific) path mapping is useful /there/, and
whether some of the calls are needed at all is dubious. I added some
FIXME and changed a few cases directly.

Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 06:56:55 +00:00
hjk
0dc61f55c3 Debugger: Use more FilePath in source file handling
Needed for the double-remote case.

With this we have proper breakpoint markers in the text editor for a remotely
running gdb on a remotely loaded project.

Change-Id: If80e4a4108a4a0bcdd7612a59e2bd695213f5ea5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-03-15 12:34:58 +00:00
hjk
3e7d93c788 ProjectExplorer: Move some not-fully-session related bits
... out of SessionManager.

The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.

Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.

Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-01 09:26:50 +00:00
hjk
89880907f2 Debugger: Simplify paramenter setup on Windows
Change-Id: Iec44dd33287ac23d2b51ef32483eae831d2ce4bd
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-07 14:07:52 +00:00
hjk
4ddd28ae22 Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*
... and re-use the old QtcProcess::readAllStandard* names for
a QString-returning 'decoded' version.

For now, only use that in 'full Utf8' cases, to stay bug-compatible,
the plan is, however, to employ the QTextCodecs we have already
in the channel buffers. That will be one-by-one, though.

Change-Id: Id209e0671920d4ea4197918e872f441254112d52
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-10 12:08:53 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
hjk
15d6e1df1b Debugger: Use a full class for DebuggerRunWorkerFactory
This continues the work started with de6c7696d2.

Change-Id: Ifc306347f2346909a9eba39c74449c559a7c2f76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-06 07:16:17 +00:00
Eike Ziller
81629e9228 Merge remote-tracking branch 'origin/9.0'
Change-Id: Id7665d5a269ef58cbbb2dbfc1e5b0d1820c4e13e
2022-11-17 16:11:52 +01:00
Alessandro Portale
92f7da917e Debugger: FilePath-ify .so libs handling
Side-effect is the stabilization of the order in which the paths are
passed to the debugger (was random, before).

Change-Id: I2dba3ae6f2feef57b26eab93dee0903ee2f93dde
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 10:24:07 +00:00
hjk
2d8dc4c779 Debugger: Disable re-running
It's currently broken in a lot of configurations.

Change-Id: Ic948bb619c4860ba0c0d81a383412e6d0b007367
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-16 10:10:33 +00:00