Browse Source

Put Debugger panel info on a new page and add info (#3673)

Co-authored-by: Hugo Locurcio <[email protected]>
Matthew 5 năm trước cách đây
mục cha
commit
b75fd032ef

+ 105 - 0
tutorials/debug/debugger_panel.rst

@@ -0,0 +1,105 @@
+.. _doc_debugger_panel:
+
+Debugger panel
+==============
+
+Many of Godot's debugging tools, including the debugger, can be found in the
+debugger panel at the bottom of the screen. Click on **Debugger** to open it.
+
+.. image:: img/overview_debugger.png
+
+The debugger panel is split into several tabs, each focusing on a specific task.
+
+Debugger
+++++++++
+
+The Debugger tab opens automatically when the GDScript compiler reaches
+a breakpoint in your code.
+
+It gives you a `stack trace <https://en.wikipedia.org/wiki/Stack_trace>`__,
+information about the state of the object, and buttons to control
+the program's execution.
+
+You can use the buttons in the top-right corner to:
+
+- Skip all breakpoints. That way, you can save breakpoints for future
+  debugging sessions.
+- Copy the current error message.
+- **Step Into** the code. This button takes you to the next line of code,
+  and if it's a function, it steps line-by-line through the function.
+- **Step Over** the code. This button goes to the next line of code,
+  but it doesn't step line-by-line through functions.
+- **Break**. This button pauses the game's execution.
+- **Continue**. This button resumes the game after a breakpoint or pause.
+
+Errors
+++++++
+
+This is where error and warning messages are printed while running the game.
+
+You can disable specific warnings in **Project Settings > Debug > GDScript**.
+
+Profiler
+++++++++
+
+The debugger comes with three profilers for your processor, network operations,
+and video memory.
+
+The profiler is used to show why individual frames take as long as they do
+to process and render.
+
+Unlike other debugging tools, the profiler does not start automatically. It can
+be started at any time during gameplay by pressing the start button. You can
+even start the profiler before opening the game to profile startup performance.
+It can also be started and stopped while the game is running without losing
+information from when it was last running. The information it records won't
+go away unless you click clear, or close the game, reopen it and start
+the profiler again.
+
+After starting and stopping the profiler, you should see things being kept track
+of on the left and a graph on the right. The items listed on the left are
+everything that contributes to frame time, and they should each have a value
+for time and calls for the current frame you are looking at.
+
+The frame number in the top right tells you which frame you are currently
+looking at. You can change this by using the up or down arrows, typing in the
+frame number, or clicking on the graph.
+
+If you want to add something to your graph or think it looks too cluttered,
+you can check and uncheck the box next to an item to add or remove it
+from the graph.
+
+Network Profiler
+++++++++++++++++
+
+The Network Profiler contains a list of all the nodes that communicate over the
+multiplayer API and, for each one, some counters on the amount of incoming and
+outgoing network interactions. It also features a bandwidth meter that displays
+the total bandwidth usage at any given moment.
+
+Monitors
+++++++++
+
+The monitors are graphs of several aspects of the game while its running such as
+FPS, memory usage, how many nodes are in a scene and more. All monitors keep
+track of stats automatically, so even if one monitor isn't open while the game
+is running, you can open it later and see how the values changed.
+
+Video RAM
++++++++++
+
+The **Video RAM** tab shows the video RAM usage of the game while it is running.
+It provides a list of every resource using video RAM by resource path, the type
+of resource it is, what format it is in, and how much Video RAM that resource is
+using. There is also a total video RAM usage number at the top right of the panel.
+
+.. image:: img/video_ram.png
+
+Misc
+++++
+
+The **Misc** tab contains tools to identify the control nodes you are clicking
+at runtime:
+
+- **Clicked Control** tells you where the clicked node is in the scene tree.
+- **Clicked Control Type** tells you the type of the node you clicked is.

BIN
tutorials/debug/img/video_ram.png


+ 1 - 0
tutorials/debug/index.rst

@@ -6,3 +6,4 @@ Debug
    :name: toc-learn-features-debug
 
    overview_of_debugging_tools
+   debugger_panel

+ 6 - 97
tutorials/debug/overview_of_debugging_tools.rst

@@ -14,6 +14,12 @@ in the running game.
 Finally, you have options to debug the game running on a remote device
 and to reload changes to your scenes or your code while the game is running.
 
+Debugger Panel
+--------------
+
+Many of Godot's debugging tools are part of the Debugger panel, which you can
+find information about in :ref:`doc_debugger_panel`.
+
 Debug menu options
 ------------------
 
@@ -109,103 +115,6 @@ Shapes
 Shapes are where you can adjust the color of shapes that only appear for
 debugging purposes, such as collision and navigation shapes.
 
-Debugging tools
----------------
-
-You can find the debugger in the bottom panel. Click on **Debugger** to open it.
-
-.. image:: img/overview_debugger.png
-
-The debugger is split into several tabs, each focusing on a specific task.
-
-Debugger
-++++++++
-
-The debugger tab opens automatically when the GDScript compiler reaches
-a breakpoint in your code.
-
-It gives you a `stack trace <https://en.wikipedia.org/wiki/Stack_trace>`__,
-information about the state of the object, and buttons to control
-the program's execution.
-
-You can use the buttons in the top-right to:
-
-- Skip all breakpoints. That way, you can save breakpoints for future
-  debugging sessions.
-- Copy the current error message.
-- **Step Into** the code. This button takes you to the next line of code,
-  and if it's a function, it steps line-by-line through the function.
-- **Step Over** the code. This button goes to the next line of code,
-  but it doesn't step line-by-line through functions.
-- **Break**. This button pauses the game's execution.
-- **Continue**. This button resumes the game after a breakpoint or pause.
-
-Errors
-++++++
-
-This is where errors and warning messages are printed while running the game.
-
-Profiler
-++++++++
-
-The debugger comes with three profilers for your processor, network operations,
-and video memory.
-
-The profiler is used to show why individual frames take as long as they do
-to process and render.
-
-Unlike other debugging tools, the profiler does not start automatically. It can
-be started at any time during gameplay by pressing the start button. You can
-even start the profiler before opening the game to profile startup performance.
-It can also be started and stopped while the game is running without losing
-information from when it was last running. The information it records won't
-go away unless you click clear, or close the game, reopen it and start
-the profiler again.
-
-After starting and stopping the profiler you should see things being kept track
-of on the left and a graph on the right. The items listed on the left are
-everything that contributes to frame time, and they should each have a value
-for time and calls for the current frame you are looking at.
-
-The frame number in the top right tells you which frame you are currently
-looking at. You can change this by using the up or down arrows, typing in the
-frame number, or clicking on the graph.
-
-If you want to add something to your graph, or think it looks too cluttered,
-you can check and uncheck the box next to an item to add or remove it
-from the graph.
-
-Network Profiler
-++++++++++++++++
-
-The Network Profiler contains a list of all the nodes that communicate over the
-multiplayer API and, for each one, some counters on the amount of incoming and
-outgoing network interactions. It also features a bandwidth meter that displays
-the total bandwidth usage at any given moment.
-
-Monitors
-++++++++
-
-The monitors are graphs of several aspects of the game while its running such as
-FPS, memory usage, how many nodes are in a scene and more. All monitors keep
-track of stats automatically, so even if one monitor isn't open while the game
-is running, you can open it later and see how the values changed.
-
-Video Memory
-++++++++++++
-
-The **Video Mem** tab lists the video memory usage of the running game
-and the resources using it.
-
-Misc
-++++
-
-The **Misc** tab contains tools to identify the control nodes you are clicking
-at runtime:
-
-- **Clicked Control** tells you where the clicked node is in the scene tree.
-- **Clicked Control Type** tells you the type of the node you clicked is.
-
 Remote in scene dock
 --------------------