Break points aspx pages

前端 未结 2 771
南笙
南笙 2020-12-14 12:38

How do you set a break points in server tags in .aspx pages. e.g.

<%   dim breakhere =new object() %>

The web application is running

相关标签:
2条回答
  • 2020-12-14 13:02

    I havent tried this myself but in ASP (VBScript) you can inject a STOP statement and that will trigger the IDE to break on that line

    Example

    <%
    STOP
    Dim o as Object = new Object()
    %>
    

    HTH

    0 讨论(0)
  • 2020-12-14 13:11

    instead of setting the breakpoint directly, you could use

    <%  System.Diagnostics.Debugger.Break();
    
        // more code here...
    
         %>
    

    Maybe a better suggestion though is to not put inline code in your markup - instead put it in a method in the code-behind file, and then call that method from your markup. In your method in the code-behind, you can use the breakpoints as you normally would.

    0 讨论(0)
提交回复
热议问题