From 6c08ab05d29d7df4669dee84a0fa2c4cbd0efc50 Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Tue, 10 Jan 2023 03:26:04 +0300 Subject: [PATCH] Split general debugging and architecture diagram documentation Co-authored-by: CalebJohn --- _tools/redirects/redirects.csv | 1 + .../development/configuring_an_ide/index.rst | 2 + .../godot_architecture_diagram.rst | 10 +++++ .../development/core_and_modules/index.rst | 5 ++- .../introduction_to_godot_development.rst | 40 ------------------- contributing/development/debugging/index.rst | 37 ++++++++++++++++- 6 files changed, 52 insertions(+), 43 deletions(-) create mode 100644 contributing/development/core_and_modules/godot_architecture_diagram.rst delete mode 100644 contributing/development/core_and_modules/introduction_to_godot_development.rst diff --git a/_tools/redirects/redirects.csv b/_tools/redirects/redirects.csv index 237e26df0..1e1eb66e2 100644 --- a/_tools/redirects/redirects.csv +++ b/_tools/redirects/redirects.csv @@ -25,6 +25,7 @@ source,destination /content/3d/making_trees.html,/tutorials/content/making_trees.html /contributing/_contributing.html,/community/contributing/ /contributing/bug_triage_guidelines.html,/community/contributing/bug_triage_guidelines.html +/contributing/development/core_and_modules/introduction_to_godot_development.html,/contributing/development/core_and_modules/index.html /contributing/doc_and_l10n_guidelines.html,/community/contributing/doc_and_l10n_guidelines.html /contributing/updating_the_class_reference.html,/community/contributing/updating_the_class_reference.html /development/compiling/compiling_for_android.html,/contributing/development/compiling/compiling_for_android.html diff --git a/contributing/development/configuring_an_ide/index.rst b/contributing/development/configuring_an_ide/index.rst index c0be071f0..4c03e6d77 100644 --- a/contributing/development/configuring_an_ide/index.rst +++ b/contributing/development/configuring_an_ide/index.rst @@ -1,3 +1,5 @@ +.. _doc_configuring_an_ide: + Configuring an IDE ================== diff --git a/contributing/development/core_and_modules/godot_architecture_diagram.rst b/contributing/development/core_and_modules/godot_architecture_diagram.rst new file mode 100644 index 000000000..311be20b2 --- /dev/null +++ b/contributing/development/core_and_modules/godot_architecture_diagram.rst @@ -0,0 +1,10 @@ +.. _doc_godot_architecture_diagram: + +Godot's architecture diagram +============================ + +The following diagram describes the architecture used by Godot, from the +core components down to the abstracted drivers, via the scene +structure and the servers. + +.. image:: img/architecture_diagram.jpg diff --git a/contributing/development/core_and_modules/index.rst b/contributing/development/core_and_modules/index.rst index b5bacd047..8c5036e25 100644 --- a/contributing/development/core_and_modules/index.rst +++ b/contributing/development/core_and_modules/index.rst @@ -1,6 +1,9 @@ Engine core and modules ======================= +The following pages are meant to introduce the global organization of Godot Engine's +source code, and give useful tips for extending and fixing the engine on the C++ side. + Getting started with Godot's source code ---------------------------------------- @@ -10,7 +13,7 @@ This section covers the basics that you will encounter in (almost) every source :maxdepth: 1 :name: toc-devel-cpp-source-beginner - introduction_to_godot_development + godot_architecture_diagram common_engine_methods_and_macros core_types variant_class diff --git a/contributing/development/core_and_modules/introduction_to_godot_development.rst b/contributing/development/core_and_modules/introduction_to_godot_development.rst deleted file mode 100644 index fc3c7da7a..000000000 --- a/contributing/development/core_and_modules/introduction_to_godot_development.rst +++ /dev/null @@ -1,40 +0,0 @@ -.. _doc_introduction_to_godot_development: - -Introduction to Godot development -================================= - -This page is meant to introduce the global organization of Godot Engine's -source code, and give useful tips for extending/fixing the engine on the -C++ side. - -Architecture diagram --------------------- - -The following diagram describes the architecture used by Godot, from the -core components down to the abstracted drivers, via the scene -structure and the servers. - -.. image:: img/architecture_diagram.jpg - -Debugging the editor with gdb ------------------------------ - -If you are writing or correcting bugs affecting Godot Engine's editor, -remember that the binary will by default run the project manager first, -and then only run the editor in another process once you've selected a -project. To launch a project directly, you need to run the editor by -passing the ``-e`` argument to Godot Engine's binary from within your -project's folder. Typically: - -.. code-block:: none - - $ cd ~/myproject - $ gdb godot - > run -e - -Or: - -.. code-block:: none - - $ gdb godot - > run -e --path ~/myproject diff --git a/contributing/development/debugging/index.rst b/contributing/development/debugging/index.rst index 823636215..71536ccb0 100644 --- a/contributing/development/debugging/index.rst +++ b/contributing/development/debugging/index.rst @@ -1,12 +1,45 @@ Debugging and profiling ======================= -This section is about finding spots to optimize in the engine code when you need it in your project. +This section contains pages that provide guidance if you're looking at the +engine code trying to find an underlying issue or an optimization possibility. .. toctree:: :maxdepth: 1 :name: toc-devel-cpp-debug-profiling - macos_debug using_cpp_profilers + macos_debug vulkan/index + +Debugging the editor +-------------------- + +When working on the Godot editor keep in mind that by default the executable +will start in the project manager mode. Opening a project from the project +manager spawns a new process, which stops the debugging session. To avoid that +you should launch directly into the project using ``-e`` and ``--path`` launch +options. + +For example, using ``gdb`` directly, you may do this: + +.. code-block:: none + + $ gdb godot + > run -e --path ~/myproject + +You can also run the editor directly from your project's folder. In that case, +only the ``-e`` option is required. + +.. code-block:: none + + $ cd ~/myproject + $ gdb godot + > run -e + +You can learn more about these launch options and other command line arguments +in the :ref:`command line tutorial `. + +If you're using a code editor or an IDE to debug Godot, check out our +:ref:`configuration guides `, which cover the setup +process for building and debugging with your particular editor.