页面顶部加上
<#@ template language="C#" debug="true" hostspecific="True" #>
在需要进行调试的代码加
System.Diagnostics.Debugger.Launch();