Break points aspx pages

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?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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.

Method 2

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


Dim o as Object = new Object()


All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x