How do I create a Debug Profile

Stewart, Scott (JS) 1 Reputation point
2022-11-15T12:39:32.857+00:00

VS 2022 Enterprise (64 bit) V 17.3.5

I am stuck in an endless loop. I get an error saying that a debug profile does not exist. I have looked here and elsewhere on the internet for a solution. I have modified the output path from \bin to the full path to the bin folder (c:\User\One Drive ...\Documents\Source\Repos\Impact\Impact\bin). I end up with net6.0-windows folder in the Debug folder and the Documentation file. I tried using this folder to debug by modifying the Solution Properties -> Debug Source Files to point to that folder. Same error.

How do I fix this problem?

Scott

Developer technologies | Visual Studio | Debugging
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2022-11-15T16:18:02.897+00:00

    Is this a .NET 6/7 console app or what? When you create a .NET 6/7 app it'll auto-generate a launchsettings.json file in a Properties folder. This is the debug profile that is needed. By default it'll just run your app so you don't need to do anything. However if you wipe that file out then VS doesn't know what to debug. Create a new console app (or whatever), copy its launchsettings.json to the original project's properties folder and then try again. VS will use the first profile it finds by default.

    0 comments No comments

  2. Tianyu Sun-MSFT 34,441 Reputation points Microsoft External Staff
    2022-11-16T09:59:42.947+00:00

    Hi @Stewart, Scott (JS) ,

    Welcome to Microsoft Q&A forum.

    I’m not sure, but is there any property not set, just for example Target framework. You can check this by right-clicking your project > click Property or check the .xxproj(for example .csproj) file

    260869-image.png

    Best Regards,
    Tianyu

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.