asp.net-mvc - Cannot step into MVC4 methods
问题描述
I've followed the steps in this answer to try and step into an MVC4 method (System.Web.Mvc.UrlHelper.Action
) and it still won't work; when I debug my controller action and hit F11 on the line that calls Action()
, it doesn't step into it, it just silently steps over with no popup or anything:
var urlHelper = new UrlHelper(htmlHelper.ViewContext.RequestContext);
var myGuid = Guid.NewGuid();
* return urlHelper.Action(actionName, "Room", new { companyId = myGuid });
During the initial site loading, in the output Debug window, I get:
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-131760323543445359): Loaded 'C:\Users\Jez\AppData\Local\Temp\Temporary ASP.NET Files\vs\55b8e42d\c314116e\assembly\dl3\8aef13b9\0036c3f9_8675cd01\System.Web.Mvc.dll'. Cannot find or open the PDB file.
So it looks like the reason it can't step into MVC4 code is that it can't open the PDB file for my version of MVC4. If I F12 into the method I want to debug, the metadata shows:
#region Assembly System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// C:\Development\close.global-core\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll
#endregion
As I have followed the steps in the answer I linked, I already have these URLs setup in my symbol server Symbols locations:
- http://referencesource.microsoft.com/symbols
- http://srv.symbolsource.org/pdb/Public
- http://srv.symbolsource.org/pdb/MyGet
- http://msdl.microsoft.com/download/symbols
So I can't understand why it doesn't get the PDB file - shouldn't these allow me to debug MVC4 methods?
解决方案
推荐阅读
- python - 加载保存的模型时出现不同的架构问题
- python - Keras ImageDataGenerator 验证_split
- javascript - 如何使内部html显示在表单框下方
- python - 你如何在 SQLAlchemy 的 SQL 表达式语言上使用 JSON_OBJECTAGG 编写 MySQL 查询?
- java - IndexOutOfBound 同时对数组进行递归求和
- javascript - d3 - 无法绘制圆圈来表示音频剪辑的频率与时间的关系
- c - 如何删除数组的内容以便稍后使用 strcat()?
- php - PHP:mysqli_connect - 使用本地主机套接字时没有这样的文件或目录
- javascript - 如何让 eslint/vscode-eslint 停止 linting .eslintrc?
- kubernetes - 是否可以运行 kubeadm init 命令忽略生成证书?