Visual Studio 2019 断点受到冲击 [英] Visual Studio 2019 break point is getting hit

查看:47
本文介绍了Visual Studio 2019 断点受到冲击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2019 开发 Dotnet Core + Angular 应用程序.在发布模式下发布代码并部署在 IIS 上之后.当我将代码更改为调试并尝试调试某些东西时,断点没有在任何控制器上被击中.有没有人遇到过这个问题,对此有任何解决方案会很有帮助.这是我的项目属性

I am working on Dotnet Core + Angular application with Visual Studio 2019. After publishing code in release mode and deployed on IIS. When I changed the code to debug and tried to debug something the breakpoints are not getting hit on any controller. Does anybody ever faced this problem, it would be helpful to have any solution on this. Here is my project properties

推荐答案

Visual Studio 2019 断点正在被击中

Visual Studio 2019 break point is getting hit

这确实是一个非常奇怪的行为,我建议您可以尝试这些建议来解决您的问题:

This is indeed a very strange behavior and I suggest you could try these suggestions to troubleshoot your issue:

建议

1) 右键单击​​您的项目-->属性-->构建-->高级-->将调试信息改为Full.

1) Right-click on your project-->Properties-->Build-->Advanced-->change Debugging Information to Full.

2) 确保您使用 IIS ExpressGoogle Chrome 或更改为使用 IE 进行调试你的项目

2) make sure that you use IIS Express with Google Chrome or change to use IE to debug your project

3) 工具 --> 选项-->调试-->符号--> 选择Microsoft Symbol Servers-->点击Load All Symbols

3) Tools --> Options-->Debugging-->Symbols--> select Microsoft Symbol Servers-->Click Load All Symbols

4)关闭VS实例,删除解决方案文件夹下的.vs隐藏文件夹,binobj文件夹然后重新启动您的项目以再次测试.

4) close VS Instance, delete .vs hidden folder under solution folder, bin , obj folder and then restart your project to test again.

更新 1

根据您的问题,JS向Core发送请求,无法进入断点,您可以尝试以下步骤:

Based on your issue, JS sent request to Core and could not enter the breakpoint, you can try these steps:

1)Tools-->Options下启用选项Javascript Debugging for Asp.Net(Chrome,Edge and IE)-->调试-->通用

2) 如果您尝试在 cshtml 上调试 js,您应该将这些 js 移动到单个 javascript 文件中,然后在 cshtml 中引用此类 js 文件.你可以参考这个链接.

2) If you try to debug js on cshtml, you should move these js into a single javascript file and then reference such js file in cshtml. You can refer to this link.

希望能帮到你.

这篇关于Visual Studio 2019 断点受到冲击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆