美文网首页
在VS Code 中调试ASP.NET Core程序

在VS Code 中调试ASP.NET Core程序

作者: 早睡使人快乐 | 来源:发表于2020-01-20 15:23 被阅读0次

使用附加程序的方式来进行调试

image.png
注意这里的指向
image.png
使用attach来调试正在运行的程序,选择项目名称.dll的路径
image.png
image.png
撞到断点了,ok
image.png
这里为了撞到下面的断点把[ApiController]这个attribute去掉了,实际上这个attribute的作用就是为我们返回验证后的错误,当然还有很多其他的功能
// 摘要:
// Indicates that a type and all derived types are used to serve HTTP API responses.
// Controllers decorated with this attribute are configured with features and behavior
// targeted at improving the developer experience for building APIs.
// When decorated on an assembly, all controllers in the assembly will be treated
// as controllers with API behavior.

相关文章

网友评论

      本文标题:在VS Code 中调试ASP.NET Core程序

      本文链接:https://www.haomeiwen.com/subject/wnpjzctx.html