mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-03 05:48:42 +03:00
Clarifying some common pitfalls for Visual Studio debugging (#7062)
* Clarifying some common pitfalls for Visual Studio debugging Two minor changes made to this page, to help other people avoid wasting their time: 1. The page says at the end that it should be possible to place a breakpoint and if the steps were followed properly it should just work, however the dev_buil paramter is not mentioned anywhere in the same page and I would not be able to complete the setup without help from @anvilfolk. 2. I spent a couple of minutes trying to understand why the debugger would not attach and instead would exit with code 255 - no errors or hints shown (like path not found, or could not parse, etc). Ended up being a simple mistake of having white spaces in the path. I think its worth mentioning in the docs. Also updating the screenshot to suggest double quotation marks by default as safer alternative that can handle whitespaces. --------- Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
@@ -15,7 +15,9 @@ Visual Studio requires a solution file to work on a project. While Godot does no
|
||||
with the solution file, it can be generated using SCons.
|
||||
|
||||
- Navigate to the Godot root folder and open a Command Prompt or PowerShell window.
|
||||
- Run ``scons platform=windows vsproj=yes`` to generate the solution.
|
||||
- | Run ``scons platform=windows vsproj=yes dev_build=yes`` to generate the solution with debug symbols.
|
||||
| The ``vsproj`` parameter signals that you want Visual Studio solution generated.
|
||||
| The ``dev_build`` parameter makes sure the debug symbols are included, allowing to e.g. step through code using breakpoints.
|
||||
- You can now open the project by double-clicking on the ``godot.sln`` in the project root
|
||||
or by using the **Open a project or solution** option inside of the Visual Studio.
|
||||
- Use the **Build** top menu to build the project.
|
||||
@@ -47,9 +49,9 @@ Project Manager opens a project, the initial process is terminated and the debug
|
||||
- Open the **Debugging** section and under **Command Arguments** add two new arguments:
|
||||
the ``-e`` flag opens the editor instead of the Project Manager, and the ``--path`` argument
|
||||
tells the executable to open the specified project (must be provided as an *absolute* path
|
||||
to the project root, not the ``project.godot`` file).
|
||||
to the project root, not the ``project.godot`` file; if the path contains spaces be sure to pass it inside double quotation marks).
|
||||
|
||||
.. figure:: img/vs_3_debug_command_line.png
|
||||
.. figure:: img/vs_3_debug_command_line.webp
|
||||
:align: center
|
||||
|
||||
To learn more about command line arguments, refer to the
|
||||
|
||||
Reference in New Issue
Block a user