如何进入MVC4源代码而不构建汇编

时间:2023-01-18 23:12:09

Is there an easy way to step through the MVC 4 source from within my solution?

是否有一种简单的方法可以从我的解决方案中遍历MVC 4源代码?

I found this question but the solution requires building the MVC 4 assembly from source. I would think a symbol look up from a server would be preferable but have not been able to make this happen.

我发现了这个问题,但是解决方案需要从源代码构建MVC 4程序集。我认为从服务器上查找一个符号会更好,但是还不能实现这一点。

Ideas?

想法吗?

1 个解决方案

#1


47  

Add the following symbol servers to your Visual Studio and you are good to go:

将以下符号服务器添加到Visual Studio中,您就可以开始了:

Here's how mine look like:

我的是这样的:

如何进入MVC4源代码而不构建汇编

Also you need to configure your debugger to use them:

您还需要配置调试器来使用它们:

  1. Tools -> Options -> Debugger -> General.
  2. 工具->选项->调试器->通用。
  3. Uncheck "Enable Just My Code (Managed only)"
  4. 取消“只启用我的代码(仅管理)”
  5. Check "Enable .NET Framework source stepping"
  6. 检查“启用。net框架源代码步进”
  7. Check "Enable source server support"
  8. 检查“启用源服务器支持”
  9. Uncheck "Require source files to exactly match the original version"
  10. 取消检查“要求源文件与原始版本完全匹配”

Oh and of course don't forget to revert those settings back when you no longer need to debug in .NET sources or otherwise debugging might become a painfully slow experience for you.

哦,当然,当您不再需要在。net源代码中进行调试或调试时,不要忘记将这些设置还原,否则调试对您来说可能会是一种痛苦的缓慢体验。

#1


47  

Add the following symbol servers to your Visual Studio and you are good to go:

将以下符号服务器添加到Visual Studio中,您就可以开始了:

Here's how mine look like:

我的是这样的:

如何进入MVC4源代码而不构建汇编

Also you need to configure your debugger to use them:

您还需要配置调试器来使用它们:

  1. Tools -> Options -> Debugger -> General.
  2. 工具->选项->调试器->通用。
  3. Uncheck "Enable Just My Code (Managed only)"
  4. 取消“只启用我的代码(仅管理)”
  5. Check "Enable .NET Framework source stepping"
  6. 检查“启用。net框架源代码步进”
  7. Check "Enable source server support"
  8. 检查“启用源服务器支持”
  9. Uncheck "Require source files to exactly match the original version"
  10. 取消检查“要求源文件与原始版本完全匹配”

Oh and of course don't forget to revert those settings back when you no longer need to debug in .NET sources or otherwise debugging might become a painfully slow experience for you.

哦,当然,当您不再需要在。net源代码中进行调试或调试时,不要忘记将这些设置还原,否则调试对您来说可能会是一种痛苦的缓慢体验。