Umbraco debugging made easy

January 20th, 2008

This post will show you how to debug umbraco macros, with the click of a browser button.

When you need to debug your macros, either xslt or usercontrols you do this by appending some text to the querystring on the page you need to debug.  The most important for me is ?umbDebugShowTrace=true it shows you the build in stack trace from the .NET framework. You can use this if your macro shows/throws an error, in the trace you can see exactly what went wrong in your xslt- or usercontrol macro. The other one is ?umbDebug=true which will show you what is injected into your macro.

For more information see the book debugging

Some screenshots from Internet Explorer and Firefox

Debugging in Internet Explorer

Debugging in Firefox

The trick is to make some favorite links in your browser containing javascript appending the debug querystring to the current page in browser. This is called bookmarklets.

Installing the debug buttons

Option 1: Install via right click in Internet Explorer
Make sure the "Links" is checked under View ? Toolbars ? Links.
Place the three favorites links in the favorite folder called Links.
Right click on this link: Umbraco Debug and choose "Add to favorites...".
Right click on this link: Umbraco Macro Info and choose "Add to favorites...".
Right click on this link: Umbraco Remove Debug and choose "Add to favorites...".

Option 2: Install via drag'n drop in Firefox
Make sure the "Bookmarks Toolbar" is checked under View ? Toolbars ? Bookmarks Toolbar.
Drag this link: Umbraco Debug up to your Bookmarks Toolbar.
Drag this link: Umbraco Macro Info up to your Bookmarks Toolbar.
Drag this link: Umbraco Remove Debug up to your Bookmarks Toolbar.

Are your buttons not visible after being installed?
Click here to see how to find them in Internet Explorer.
Click here to see how install them in Firefox via option 1

 

Tags: Umbraco, Umbraco Extension

Comments

#1 - Hartvig on January 20, 2008 22:16

Top notch - works really sweet!

#2 - Karl Kopp on January 21st, 2008 04:57

Why not update the Umbraco books with this super useful information?

#3 - Simon on January 21st, 2008 16:36

Will add a link to this page in the Umbraco book titled Umbraco Debugging as soon as I get home :)

#4 - Simon Justesen on January 21st, 2008 16:40

Erhm.. Correction - the book is called "Debugging"

#5 - Phillip on June 05, 2008 13:33

Excellent! You saved me from my debugging nightmare. It works great! Thanks

#6 - Nikola on July 15, 2008 10:14

Perfect!! I always forget the correct sequense of words: umb debug show and trace.. :D

#7 - software development company on August 27, 2009 20:15

Cool,

it saved my day I'm tired of debuging and thanks for your help

Thanks for writing, most people don't bother.

#8 - web development company on October 19, 2009 11:10

Hey, that was interesting,

this is a great help for debugging macros, thanks for sharing,

Keep up the good work

Anyway, thanks for the post

#9 - Laurie on November 12nd, 2009 12:47

Its on our computers! :D Little gem this!

#10 - http://buypillsshop.info on December 06, 2009 23:32

http://buypillsshop.info

#11 - future music store on December 07, 2009 10:45

Its on our computers! ;) Little gem this!

#12 - business plan on January 05, 2010 11:39

nice blog!

#13 - Buy viagra sydney on January 08, 2010 14:57

Buy viagra sydney

#14 - lasix on January 11st, 2010 12:28

For firefox more extensions exist! Use firefox, IE must be die =)

#15 - download minimal techno on January 20, 2010 20:21

Can i use it with Opera?

#16 - blog health on January 24, 2010 16:47

No. Yep, Opera also supported.

#17 - http://avto-transfer.com.ua/ on February 11st, 2010 16:56

Car Rental in Ukraine

#18 - Dame on March 01st, 2010 08:32

Best idea!!!

#19 - facebook farmville cheats on March 03rd, 2010 14:34

Thanks for sharing.

#20 - PeterJ on March 04, 2010 21:23

Very useful post. I'm just considering using Umbraco so I'm routing around the web for info.

 

Create a new comment

Recent Post

Tags