Basic Visual Studio Debugging
Hi, I am having problems with the debugging process, It wants me to attach the program before starting it, I am very beginner and have no clue how to attach, I a using VS 2022
33 Replies
$debug
Tutorial: Debug C# code - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
If you're running your project through VS, you should not need to attach anything

Did you just open a loose
Program.cs
file?
what do you mean by loose?
Not a
.csproj
project or a .sln
solutionit was sln
VS will open C# files on their own, sure
Aight, that's odd, then
Do you see the solution explorer?
I don't

No solution explorer on the right of the screen in VS?
there is

Empty, though
yes
It seems you didn't add a project to the solution, somehow
Is that even possible
Apparently ¯\_(ツ)_/¯
Right-click on the solution and try to add an existing project
Then add your project
right clck, then add


still empty

.-.
Existing project, not a new project

it gives me an error
huh
So... do you, by chance, not have the SDK installed... somehow?
dotnet --list-sdks
in the consoleI have no clue
I am downloading it
I managed it
I guess...
is that what it should look like?

ye
Thanks then