Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

<%   dim breakhere =new object() %>

The web application is running in debug mode with the <compilation debug="true" ... in the web.config. But the page says:

The break point will not currently be hit. No symbols have been loaded for this document.

Is there anything else i need to set?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
594 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...