They are simple to apply. Just select one and you have your entire log filtered. For instance, I can separate an ASP.Net log by each user’s session.
You can also build your own filters using a simple to use dialog.
There are many other features such as bookmarks, comments, the ability to search for methods and separators. It’s easy to be searching through a log and have to stop and do something else or need to pass information on to another developer. SmartInspect lets me add my notes to it easily. Just right click. You can see I added a comment below.
Overall I was very impressed with SmartInspect. It’s easy to use with almost no learning curve and the logs are presented in a useful way instead of lines of useless text. I’ve only scraped the surface of the log viewer here and its capabilities. I highly suggest you download a demo copy and play with it yourself.
I am also going to include a macro that I wrote.In order to help facilitate adding the EnterMethod and LeaveMethod to each function I write, I designed a macro. Just put your cursor in your C# method and run the macro. It will put the enter and leave tags in your code and read the method name for them. It’s not tested extensively so use at your own risk . It’s provided as is.
Dim projectItem As ProjectItem = DTE.ActiveDocument.ProjectItem
Dim fileCodeModel As FileCodeModel = projectItem.FileCodeModel
' Get the current selection
Dim selection As TextSelection = DTE.ActiveDocument.Selection
' Get the current cursor location
Dim point As TextPoint = selection.ActivePoint
' Try to read the current location as a code element
Dim codeElement As CodeElement = _
If (codeElement Is Nothing) Then
MsgBox("Place mouse cursor in a method before running this macro.", _
Dim codeFunction As CodeFunction = CType(codeElement, CodeFunction)
Dim fieldName As String = codeFunction.Name
Dim startPoint As EditPoint = codeFunction.GetStartPoint(vsCMPart.vsCMPartBody).CreateEditPoint
startPoint.Insert("SiAuto.Main.EnterMethod(""" & fieldName & """);")
Dim endPoint As EditPoint = codeFunction.GetEndPoint(vsCMPart.vsCMPartBody).CreateEditPoint
endPoint.Insert("SiAuto.Main.LeaveMethod(""" & fieldName & """);")