2

I have Created a .net Core Web Api Project in Visual Studio code. I wanted to Debug the app so I Added the Configuration as "Attach to Local .Net Core Console App".after that i pressed debug button. then it asked me to attach the app.but my app didn't appear in the dropdown. i tried several things but didn't work anything.I found that the configuration settings stored in the "launch.json" file and I cleared the configurations array from the launch.json and re added from the add configuration button. but didn't work anything yet. the problem is when i try to attach to the process of my app is not showing to attach. Please help me to fix the issue. I have attached some images and the project. launch.Json File debuger window where i should attach the process

project Thanks.

2
  • Edit launch.json and change program to point to your actual assembly file path. Commented Oct 13, 2018 at 12:52
  • Thanks lex . it is working now. Commented Oct 13, 2018 at 17:42

2 Answers 2

5

Copied from comment.

VSCode's C# extension usually generates a launch.json file, but it does not work immediately, as its program attribute requires your edit so as to point to the correct executable.

https://code.visualstudio.com/Docs/editor/debugging#_launchjson-attributes

Sign up to request clarification or add additional context in comments.

Comments

0

Your .vscode folder should include a launch.json file.
If it's not there, simply close vs code and open it again, make sure you are in the project directory (from the Terminal).
Then a vs code pop up will appear from the bottom right telling you it can't detect a launch.json and it will ask you whether it should create one for you. Click yes, then press F5 and the API server will run in debug mode.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.