Aliud Vicis Receptor debug Dolum

I’m sure I’m not the first person to come up with this. Autem, I haven’t noticed anyone publish a trick like this since I started paying close attention to the community last July. Ita, Ego stipes hoc mallem de facili debug apicem.

I’m working on an event receiver that started to generate this error in the 12 alveare:

Error oneratisque et currit eventus susceptor Conchango.xyzzyEventReceiver in xyzzy, Version = 1.0.0.0, Culturae = neutra, PublicKeyToken=blahbalhbalh. Additional information is below. : Non objectum secundum posuit ad instantiam objectum.

I didn’t know where I had introduced this bug because I had done too many things in one of my code/deploy/test cycles.

I tried this solution to get my pdb in there with hopes that SharePoint’s 12 hive would show the stack trace, sed non fortuna. I don’t know if it’s possible and if someone does, placet me cognoscere 🙂

I know it’s possible to write your own log messages to the 12 alveare. Frankly, I wanted something a little less scary and quicker to implement.

It occurred to me that I could at least get some basic trace information by catching and re-throwing generic exceptions like this:

  experiri {
    UpdateEditionDate(Proprietates);
  }
  capiendos (Exceptio e)
  {
    mittent novum Exceptio("Dispatcher, UpdateEditionDate(): Exceptio: [" + e.ToString() + "].");
  }

This showed up in the 12 hive thusly:

Error oneratisque et currit eventus susceptor Conchango.xyzzyEventReceiver in xyzzy, Version = 1.0.0.0, Culturae = neutra, PublicKeyToken=blahblahblah. Additional information is below. : Dispatcher, UpdateEditionDate(): Exceptio: [System.NullReferenceException: Non objectum secundum posuit ad instantiam objectum. at Conchango.xyzzyManagementEventReceiver.UpdateEditionDate(SPItemEventProperties proprietatum) at Conchango.xyzzyManagementEventReceiver.Dispatcher(SPItemEventProperties proprietatum, String eventDescription)].

That gave me all the detail I needed to track down that particular problem and I expect to use it a lot going forward.

</finem>

Scribet ad mea blog!

3 cogitationes on "Aliud Vicis Receptor debug Dolum

  1. Anders Rask
    I have had alot of luck lately debugging this kind of issues with a combination of SPTraceView and DebugView
    Debugview alone is very usefull as well. You can pipe out output using System.Diagnostics.Debug.WriteLine().
    You dont even have to remove them when you release build, since the output only is triggered in debug build mode.
    SPTraceView is a tool created by Hristo Pavlov.
    At its default setting it will show you ULS trace events as they happen. Et quoque accendit illam eventuum ULS vestigium: * non * facere diagnostics stipes!
    Sed cucurri utilitate credendi, quod iam disable. Multoque melius est ut vos can agis tibia output ut usque in DebugView.
    Habet etiam alot Nicaenae features pro filtering in campestribus vicis, servicia etc.
    hth
    Anders
    oh and nice seeing you in the bar at SPBP 🙂

Aliquam

Tua inscriptio electronica non editis. Velit sunt insignis *