Copied to clipboard

Flag this post as spam?

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


  • Graham Carr 277 posts 389 karma points
    Mar 18, 2014 @ 16:24
    Graham Carr
    0

    Debugging macros

    In the past you were able to use ?umbDebugShowTrace=true to see the true error of an Umbraco Macro. I know this is no longer supported in Umbraco 7, therefore what is now the best method to see the true error message being produced by a Razor macro in Umbraco 7??

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 18, 2014 @ 17:10
    Jan Skovgaard
    0

    Hi Graham

    This changed with the release of Umbraco 6.1.0.

    Now you can write ?umbdebug=true and see a miniprofiler as described in this post http://umbraco.com/follow-us/blog-archive/2013/5/30/indulge-in-all-this-umbraco-goodness-three-releases-in-one-day.aspx - I have not tested with v7 yet but I suppose this would be the same steps to take.

    Please note it does not work using XSLT based macroes. Then one will have to open up the logfile found in /app_data/logs

    Hope this helps.

    /Jan

  • Graham Carr 277 posts 389 karma points
    Mar 18, 2014 @ 17:22
    Graham Carr
    0

    Hi Jan,

    Thanks for the heads up. I have managed to get the mini-profiler working but this doesn't seem to expose the actual error that a macro is throwing unlike the umbDebugShowTrace method which used to display the exact C# error in RED. How do you go about getting the C# error that a macro is actually throwing in Umbraco 7??

    Graham

  • Matt 91 posts 237 karma points
    Apr 25, 2014 @ 10:40
    Matt
    0

    Graham - did you find any solution/alternative to this?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 25, 2014 @ 10:43
    Jan Skovgaard
    0

    Hi Guys

    Sorry for the late answer - Must have missed the e-mail notification on this one.

    Have you set "umbracoDebugMode" to true in the web.config file?

    /Jan

  • Matt 91 posts 237 karma points
    Apr 25, 2014 @ 10:46
    Matt
    0

    Hi Jan,

    Yes - as Graham mentioned the mini profiler works but doesn't expose the macro error like the umbDebugShowTrace did. (or the contents of UmbracoTraceLog)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 25, 2014 @ 10:48
    Jan Skovgaard
    0

    Hi Matt

    Hmm, yeah that is a bugger. Think you can find those in the /app_data/logs file with the "ERROR" tag...

    /Jan

  • Matt 91 posts 237 karma points
    Apr 25, 2014 @ 10:49
    Matt
    2

    Out of interest what's the best practice for debugging macros? Develop in visual studio/get the errors on build?

Please Sign in or register to post replies

Write your reply to:

Draft