diff options
author | Glen Chung <kuchung@microsoft.com> | 2023-03-16 00:50:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-30 13:46:12 (GMT) |
commit | a9a592f96e6498da302f8e968be1db0ad3c32123 (patch) | |
tree | 0d75f16ee2eae99b1a3f063e575b3f5f8f2ee931 /Help | |
parent | b0d1ddb7234950374977b83f8dbded806c15b356 (diff) | |
download | CMake-a9a592f96e6498da302f8e968be1db0ad3c32123.zip CMake-a9a592f96e6498da302f8e968be1db0ad3c32123.tar.gz CMake-a9a592f96e6498da302f8e968be1db0ad3c32123.tar.bz2 |
cmake: Add debugger
- Depends on cppdap and jsoncpp.
- Add --debugger argument to enable the Debugger.
- Add --debugger-pipe argument for DAP traffics over named pipes.
- Support breakpoints by filenames and line numbers.
- Support exception breakpoints.
- Call stack shows filenames and line numbers.
- Show Cache Variables.
- Show the state of currently defined targets,
tests and directories with their properties.
- Add cmakeVersion to DAP initialize response.
- Include unit tests.
Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake.1.rst | 53 | ||||
-rw-r--r-- | Help/release/dev/cmake-debugger.rst | 5 |
2 files changed, 58 insertions, 0 deletions
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 1ea7626..b5848f7 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -517,6 +517,53 @@ Options If ``<type>`` is omitted, ``configure`` is assumed. The current working directory must contain CMake preset files. +.. option:: --debugger + + Enables interactive debugging of the CMake language. CMake exposes a debugging + interface on the pipe named by :option:`--debugger-pipe <cmake --debugger-pipe>` + that conforms to the `Debug Adapter Protocol`_ specification with the following + modifications. + + The ``initialize`` response includes an additional field named ``cmakeVersion`` + which specifies the version of CMake being debugged. + + .. code-block:: json + :caption: Debugger initialize response + + { + "cmakeVersion": { + "major": 3, + "minor": 27, + "patch": 0, + "full": "3.27.0" + } + } + + The members are: + + ``major`` + An integer specifying the major version number. + + ``minor`` + An integer specifying the minor version number. + + ``patch`` + An integer specifying the patch version number. + + ``full`` + A string specifying the full CMake version. + +.. _`Debug Adapter Protocol`: https://microsoft.github.io/debug-adapter-protocol/ + +.. option:: --debugger-pipe <pipe name>, --debugger-pipe=<pipe name> + + Name of the pipe (on Windows) or domain socket (on Unix) to use for + debugger communication. + +.. option:: --debugger-dap-log <log path>, --debugger-dap-log=<log path> + + Logs all debugger communication to the specified file. + .. _`Build Tool Mode`: Build a Project @@ -809,6 +856,12 @@ Available commands are: ``true`` if TLS support is enabled and ``false`` otherwise. + ``debugger`` + .. versionadded:: 3.27 + + ``true`` if the :option:`--debugger <cmake --debugger>` mode + is supported and ``false`` otherwise. + .. option:: cat [--] <files>... .. versionadded:: 3.18 diff --git a/Help/release/dev/cmake-debugger.rst b/Help/release/dev/cmake-debugger.rst new file mode 100644 index 0000000..bfc4f6c --- /dev/null +++ b/Help/release/dev/cmake-debugger.rst @@ -0,0 +1,5 @@ +cmake-debugger +-------------- + +* :manual:`cmake(1)` now supports interactive debugging of the CMake language. + See the :option:`--debugger <cmake --debugger>` option. |