在.NET CORE MVC 6应用程序中调试未命中的断点 [英] Debugging not hit breakpoints in .NET CORE MVC 6 application

查看:314
本文介绍了在.NET CORE MVC 6应用程序中调试未命中的断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发.NET CORE 1.0 MVC 6应用程序,我坚持使用调试点,因为它昨天停止运行.尝试次数我删除项目,然后重新开始.即使是由于我没有在工具->调试->符号中取消选中,它也第一次加载符号,但是它遇到了断点.现在,如果我在控制器中选择仅启用我的代码",它只会打C#类"Startup.cs".我从下拉菜单中有调试"选项,但不确定为什么.在这里需要帮助.

I am working on .NET CORE 1.0 MVC 6 application and I stuck with the debugging point as it stopping hitting yesterday. with number of try I delete project and start again. First time it load symbols even due I have uncheck in Tool --> Debugging --> symbols, however it hit breakpoints. Now it only hitting C# class 'Startup.cs' if I choose 'Enable Just My Code' but in controller. I have Debug option from dropdown, not really sure why. Need help here.

我更改为

但仍然没有成功

 public class HomeController : Controller
{
    public IActionResult Index()
    {
        var x = 2 + 3;

        return View();
    }

    public IActionResult About()
    {
        var x3 = 2 + 6;
        var xx = "dd";

        ViewData["Message"] = "Your application description page.";

        return View();
    }

调试输出

推荐答案

实际上,您的屏幕截图不是调试输出,而是构建输出.

actually your screen shot was not the debug output, it was the build output.

如果禁用启用我的代码",并在工具"->选项"->调试"->符号"下启用/禁用Microsoft符号服务器,然后在重新打开应用程序后对其进行调试,结果如何?

If you disable the "Enable Just My Code", and enable/disable the Microsoft symbols Server under TOOLs->Options->Debugging->Symbols, and then debug your app after you re-open it, how about the result?

如果我创建一个新的应用程序,则断点正常被击中,如果我重新打开该解决方案,实际上它仍然可以击中断点,但是速度非常慢.像屏幕截图1一样,如果您访问调试"输出窗口,它将逐一列出加载的符号,大约1分钟后,它将像屏幕截图2所示到达断点.当然,我在TOOLS下启用了Microsoft符号-> Options-> Debugging-> Symbols并禁用上述步骤的Enable Just My Code.

If I create a new app, the breakpoint was hit normally, if I re-open the solution, actually it still could hit the breakpoint, but it is very slow. Like the screen shot 1, if you visit the "debug" output window, it would list the symbols loaded one by one, after about 1min, it would hit the breakpoint like screen shot 2. Of course, I enabled the Microsoft symbols under TOOLS->Options->Debugging->Symbols and disabled the Enable Just My Code for the above steps.

所以对于您的问题,一个可能的原因是它只是缓慢加载符号,请稍等片刻.

So for your issue, one possible reason is that it just loads the symbols slowly, just wait for a moment.

这篇关于在.NET CORE MVC 6应用程序中调试未命中的断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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