[英].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. 我已经附上了一些图片和项目。
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.