Commit Graph

22 Commits

Author SHA1 Message Date
Artem Sokolovskii
7605f5c934 DAP: Add different log category for different dap engines
Change-Id: Ia21926b860f8fee7399c40ad382ff31f360f73ce
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 10:52:32 +00:00
Artem Sokolovskii
578e4c13fd DAP: Add attach function to gdb dap engine
Change-Id: Id1c886cf3bbdbf85d4eed39f288107fc71317496
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-12 10:52:21 +00:00
Artem Sokolovskii
1b67da6558 DAP: Show variables for different scopes
Fixed displaying several the same variables.

Change-Id: I848113de3a5e142394fbdb4efd40230f43c2417f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-09-06 09:49:58 +00:00
Artem Sokolovskii
53718bcf1d DAP: Add locals lazy loading
Change-Id: I49c6d9fce8c6f45f1ec4cb3b6c1733d93202bc0f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-01 09:05:28 +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
b80cef815e DAP: Fix rootWatchItem deletion
Change-Id: I2fcdf7547a361dcb136cd1a03325e7f5186b273a
Reviewed-by: hjk <hjk@qt.io>
2023-08-28 15:29:04 +00:00
Artem Sokolovskii
e3808cf4f4 DAP: Change unique_ptr to QObject parenting
Change-Id: I47f5db1823e69829294fb9f551a2edcb980d86dc
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 12:33:53 +00:00
Artem Sokolovskii
0192c3c26d DAP : Refactor DapEngine
Extracted client part to additional class DapClient.

Change-Id: Iba472d2fb2c2390f38ad9a3a75e9e1d9a76f912c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 11:02:13 +00:00
Artem Sokolovskii
b01fcf5e7a DAP: Add enable/disable breakpoint support
Change-Id: Ice1c17e1c1e257d9f828bb6a54c643f7ecf7b387
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-15 10:23:16 +00:00
Artem Sokolovskii
888e7e0c6d DAP: Add select thread support
Change-Id: Ib85d7d4413284d5919a2b19016aec503c9cb5fca
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-08-14 12:16:31 +00:00
Artem Sokolovskii
8b1047aa8f DAP: Refactor dap responses handling
Change-Id: Iebc16d7e497b4f3a1deec6f52f7b89815c2cde3b
Reviewed-by: hjk <hjk@qt.io>
2023-08-14 09:58:11 +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
Artem Sokolovskii
eeea437743 DAP: Add displaying nested variables
Change-Id: I588dde7c0ef402fe8d6c9d43dc9f0183bfa2d733
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 08:47:08 +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
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
Artem Sokolovskii
03aeee71f4 DAP: Add showing locals and stack trace
Change-Id: I5298b4c2daf45ec4503d4a210e02b7025253c054
Reviewed-by: hjk <hjk@qt.io>
2023-06-22 13:31:57 +00:00
Artem Sokolovskii
b4874b6ce5 DAP: Add thread list
Change-Id: Ide9305e246f4e0dbe687e37a96b20e99b197ea3f
Reviewed-by: hjk <hjk@qt.io>
2023-06-21 10:37:48 +00:00
Artem Sokolovskii
9ad37a3c43 DAP: Add stepIn and stepOut and stepOver
Change-Id: I7d2bb573c4fc359a4d07b4cff8867a47f9691392
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-21 10:37:20 +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
Artem Sokolovskii
cbaeee89d6 Debugger: DAPEngine improve breakpoints handling
- Added proper "Insert" breakpoint
- Added proper "Remove" breakpoint
- Fixed errors with engine states after pause and continue

Change-Id: Icbe1b4cf549cee633809d0a1c9ab19dbf877dbf0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-04-14 15:05:36 +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