简体   繁体   English

.Net Core Web Api项目无法使用Visual Studio代码进行调试

[英].Net Core Web Api project Can't Debug with Visual studio code

I have Created a .net Core Web Api Project in Visual Studio code. 我已经在Visual Studio代码中创建了一个.net Core Web Api项目。 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. 我想调试该应用程序,因此我将配置添加为“附加到本地.Net Core控制台应用程序”。之后,按了调试按钮。 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. 我尝试了几件事,但是什么都没做。我发现配置设置存储在“ launch.json”文件中,我从launch.json中清除了配置数组,然后从添加配置按钮中添加了它。 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文件 调试器窗口,我应该在其中附加过程

project Thanks. 项目谢谢。

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. VSCode的C#扩展名通常会生成一个launch.json文件,但由于它的program属性需要进行编辑才能指向正确的可执行文件,因此它不会立即起作用。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法在Visual Studio中调试WPF项目 - Can't Debug WPF project in Visual Studio 无法在 .NET 5 和 Visual Studio Code 中引用 Entity Framework Core - Can't reference Entity Framework Core in .NET 5 and Visual Studio Code Visual Studio Code .NET Core 项目显示详细的调试控制台消息 - Visual Studio Code .NET Core project shows verbose debug console messages Visual Studio Code 中 .NET Core Web API 的 EF Core 迁移错误 - EF Core migration error with .NET Core Web API in Visual Studio Code 在Visual Studio Code中调试多个ASP.NET Core项目 - Debug multiple ASP.NET Core projects in Visual Studio Code 如果可能,您可以从其解决方案/项目文件夹中托管一个.Net核心Web API并通过IIS进行调试 - If possible can you host a .Net core web API from it's solution/project folder and debug though IIS 我们如何在 Visual Studio Code 中调试 ASP.NET MVC Web 应用程序? - How can we debug ASP.NET MVC web application in Visual Studio Code? 无法在 Visual Studio 2019 中调试我的 .net 5 web api - Cant debug my .net 5 web api in visual studio 2019 无法调试在Visual Studio 2015上开发并托管在IIS上的asp.net Web应用程序 - Can't debug my asp.net web app developped on visual studio 2015 and hosted on IIS Visual Studio 2017 中的空 ASP .NET Core Web 应用程序项目 - Empty ASP .NET Core Web Application project in Visual studio 2017
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM