Error when trying to run project in Visual Studio

Godot Version

4.2.1

Question

I’m learning C# and when I try to run the project in Visual Studio, it generates an error file. It seems Godot is not able to determine what should be opened. What configuration am I missing?

I have this profile configured in VS:

Enable native code debugging is also enabled. What else should I configure?

Hi,
You probably haven’t selected a default scene to run.
Try run game inside Godot editor. Godot will ask to choose default scene.

Or you can choose manually.
Project → Project Settings → General → Application → Run

“Default Scene” I mean “Main Scene”.

It’s running! But I can’t see the output in VS. I’m trying to print something with GD.Print(Hello); but I don’t see this print result anywhere in VS or Godot.

Unfortunetlly, I don’t know how to resolve this problem.
I have two ways to debug:

  • “Light debug”: using GD.Print() and run project by Godot Engine. It’s just only general diagnosis.
  • “Hard debug”: using VS, breakpoints, checking variable values etc. (but without output - in my opinion this is not neccesary if I can see variable values)
1 Like