godotengine / godotengine/godot-csharp-visualstudio

[WIP] Godot4 Visual Studio 2022 Guide

Open
#48 7 comments 0 reactions 1 assignee Claimed by @neikeq View on GitHub
enhancement
Dominant language
C#
Stars
276
Forks
27
PR merge metrics
No merged PRs in 30d

Description

### Update March 2023

Firstly you need to create a new debugging profile `Menu > Debug > Debug Properties`

Selecting executable as a new profile type in the top corner of the profile configurator.

[Optional] Rename the executable profile

- Enter the location of the **Godot Executable** and
> e.g. Godot_v4.0.1-rc2_mono_win64.exe
- Enter the **working directory** to the project folder

##### [Reference](https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html)
## Launch
in the command line
`--path . --verbose`

## Launch (select scene)
in the command line
`--path . scene.tscn --verbose`

## Launch (select Script)
in the command line
`--path . --script --verbose`

## Editor
in the command line
`--path . --editor --verbose`
### Optionals

#### [1] Make GD.Print appear in the program output window (To be verified)

<details>
<summary>Include GD.cs</summary>
==> Need to update GD.cs to the lastest Godot4 rc2

[Debugging Godot4 beta projects from VS and VSCode](https://www.reddit.com/r/godot/comments/xhirp8/debugging_godot4_beta_projects_from_vs_and_vscode/)
> I haven't found a fix for the first issue, but I've shared a [GD.cs](https://gist.github.com/SilentPenguin/bf24eb348c9d00c34605d1cc54318be7) to pipe GD.Print functions to the output window. Just drop it into your project folder if you want that.
</details>

#### [2] Hot Reload (To be verified)

#### [3] Debug Editor Tool (To be verified)
If you want to also be able to debug editor tools add another profile and use the same arguments but add --editor as well.

`--path . --editor`
in the command line

#### Update Oct 2022
<details>
<summary>Debugging Godot4 beta projects from VS2022</summary>

[Run+Debug Godot4 C# projects from Visual Studio](https://www.reddit.com/r/GodotCSharp/comments/xgpqfh/oc_rundebug_godot4_c_projects_from_visual_studio/)

[Debugging Godot4 beta projects from VS and VSCode](https://www.reddit.com/r/godot/comments/xhirp8/debugging_godot4_beta_projects_from_vs_and_vscode/)

[Is this Obsolete? VS2022 works with Godot 4.Beta1 no extension needed](https://github.com/godotengine/godot-csharp-visualstudio/issues/42)

</details>

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.