So have you ever heard this â€œThere is Nothing in the ULS Logsâ€ or better (worse) yet you have experienced it. Yea me too, itâ€™s a real bummer and your next step is to typically crank up the ULS logging verbosity and crossing your fingers. Sometimes you get lucky and sometimes you donâ€™t â€“ so where next? I have found myself attaching a debugger and looking at the managed exception messages that trail across the debugger window while I reproduce the problem and sometimes these are enough to either provide a line of investigation or possibly the answer to my issue.
I have suggested this a few times to folks as something to try and I typically get push back. To make this entire process a heck of allot easier I have created a small managed debugger I call SNAP. With the latest update I added the ability to monitor exceptions occurring with a managed process. Using this tool will hopefully give you some insight into what may be happening within SharePoint for which the ULS leaves you scratching your head. So lets see how this may workâ€¦
So lets take a look a one particular SharePoint issue which I ran into a while back and use this method to troubleshoot it down to a resolution.
- Create a new site collection with a Team Site Template as the root site.
- Now create a new sub-site based on the Enterprise Search Center template
- You should see a screen like this:
Unfortunately taking a look through the ULS logs, even after cranking up the verbosity is not going to gain you much here so this is one of those cases where I recommend using SNAP.
After downloading SNAP from the link below run the tool with a command like such as: snap â€“c emon [-p | â€“pn | â€“ap] were â€“p can be used to pass a Process ID, â€“pn can be used to pass a process name such as â€œw3wp.exeâ€ or you can use â€“ap like I did in the screenshot below and pass an application pool name.
With SNAP attached to my IIS process (w3wp.exe) I now try this operation again and as you can see from the screenshot above I am peppered with exceptions. The exception messages actually give me some useful information here:
The SharePoint Server Publishing Infrastructure feature must be activated at the site collection level before the Publishing feature can be activated.
WOOP! This is real actionable information which I wish was available in the UI but at least in the ULS logs.
PS — Turing on the Publishing Feature in the root site resolved this issue.
As with any tool offered for free on this site I donâ€™t offer direct support, warranty, licensing, etc. but I am willing to answer any questions you may have.
Tool Download: http://todd.in/getsnap (681 kb)