Recommend LLDB over GDB for VSCode

This commit is contained in:
developer
2021-08-24 22:43:48 +02:00
committed by Hugo Locurcio
parent ac03b6faf6
commit 1b104744a9

View File

@@ -85,12 +85,13 @@ To run and debug the project you need to create a new configuration in the ``lau
- Within the ``launch.json`` file find the ``"configurations"`` array and add a new section to it:
.. tabs::
.. code-tab:: js Linux/X11
.. code-tab:: js X11
{
"name": "Launch Project",
"type": "cppdbg",
"type": "lldb",
"request": "launch",
// Change to godot.x11.tools.64.llvm for llvm-based builds.
"program": "${workspaceFolder}/bin/godot.x11.tools.64",
// Change the arguments below for the project you want to test with.
// To run the project instead of editing it, remove the "--editor" argument.
@@ -98,9 +99,26 @@ To run and debug the project you need to create a new configuration in the ``lau
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
"externalConsole": false,
"preLaunchTask": "build"
}
.. code-tab:: js X11_gdb
{
"name": "Launch Project",
"type": "cppdbg",
"request": "launch",
// Change to godot.x11.tools.64.llvm for llvm-based builds.
"program": "${workspaceFolder}/bin/godot.x11.tools.64",
// Change the arguments below for the project you want to test with.
// To run the project instead of editing it, remove the "--editor" argument.
"args": [ "--editor", "--path", "path-to-your-godot-project-folder" ],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"setupCommands":
[
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
@@ -134,6 +152,17 @@ To run and debug the project you need to create a new configuration in the ``lau
An example of a filled out ``launch.json``.
.. note::
Due to sporadic performance issues, it is recommended to use LLDB over GDB on Unix-based systems.
Make sure that the `CodeLLDB extension <https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb>`_
is installed.
If you encounter issues with lldb, you may consider using gdb (see the X11_gdb configuration).
Do note that lldb may work better with llvm-based builds. See :ref:`doc_compiling_for_linuxbsd` for further information.
The name under ``program`` depends on your build configuration,
e.g. ``godot.x11.tools.64`` for 64-bit X11 platform with ``tools`` enabled.