skip to Main Content

I’m just a begginer with C#, I wanted to start to code but when I try to debug my code, the debug part is not avaiable to be used, I’m not sure what’s wrong with the app or if it’s a problem with my computer, which runs Windows 11

Hope you can help me out.

Thanks in advance.
Here's the problem

I tried to uninstall visual studio several times, also watched some videos related to it but it was a complete waste of time.

2

Answers


  1. Check to see if you are running in debug mode or release mode.

    Login or Signup to reply.
  2. I can reproduce your situation:

    enter image description here

    This issue comes from your code is not be recognized as Project/Solution.

    C# is different from the language like python, open the script file directly will not make it be able to debug/run.

    So the solution is creating a minimal structure.

    You can follow the below steps to start a demo C# code.

    enter image description here

    enter image description here

    enter image description here

    enter image description here

    After the above steps, you will be able to debug the C# code:

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search