Sharepoint solutions

March 21, 2009

Debug net code that is called asynchronously for the user in sharepoint

Filed under: main — admin @ 10:52 pm

There is some trouble to debug net code that  is called by the system in sharepoint. For example owstimer can call custom expiration formula class asynchronously for the user. So, the ordinary method to attach visual studio debugger do not help. The solution is very simple – insert Debug.Assert(1==2, “some message”) statement in your code. When the exeption occures, press retry and choose visual studio debugger. Cetainly the custom class must contain debug information and do not be optimized.

Powered by WordPress