Wednesday, June 6, 2012

Debugging Custom SharePoint 2010 Timer Jobs

For those of you who have seen posts on how to debug custom timer jobs, you have probably noticed that many of the solutions do not work, or only work part of the time. The foolproof, 100% method for getting an instance of the debugger running on your timer job is to add this line of code at the top of your Execute method:

System.Diagnostics.Debugger.Launch();

This will immediately pause the job and prompt you to launch a debug instance, which can be done in your open VS project. Once the debug instance is running, you can resume running the job.

2 comments:

  1. A lot of the techniques performed by flash can be replicated using javascript libraries such as jQuery.

    jquery jobs

    ReplyDelete
  2. I liked your article, I will share your article to everyone!!



    ________________________________________________________________________
    WoW gold|Diablo 3 Gold|RS Gold|GW2 Gold

    ReplyDelete