Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • SaphuA 124 posts 87 karma points
    Oct 01, 2012 @ 13:18
    SaphuA
    0

    Razor debugging/exceptions

    What is the recommended way to debug inline razor?

    Is there a way to display the exceptions (instead of the displayed error message) or retrieve them from a log?

  • Funka! 398 posts 661 karma points
    Oct 02, 2012 @ 00:33
    Funka!
    0

    This is how I debug these when coding live on a server:

    • In web.config, set configuration\appSettings\umbracoDebugMode to true
    • Also in web.config, on the configuration\system.web\trace element, set enabled=true and localOnly=false
    • (Upload web.config in order to restart web app)
    • Now just append the following to your URL : ?umbdebugshowtrace=true
    • Reload your problem page, and scroll down till you find the trace. Look for the bright red part (or use your browser's Find utility)

    Be sure to put web.config back to normal when you are done!

    If you are running locally, there are other advanced ways you can do this using Visual Studio's lovely breakpoints and stepping functionality, etc.

    Best of luck!

     

Please Sign in or register to post replies

Write your reply to:

Draft