Tuesday, May 14, 2013

Debug a Timer Job in SharePoint 2010

To debug a timer job in Visual Studio 2010
  1. On the Start menu, point to Administrative Tools, and then click Services.
  2. In the Services window, make sure the SharePoint 2010 Timer service is started.
  3. Open the Visual Studio 2010 project that contains your timer job.
  4. Set a breakpoint in the Execute method of your job definition class.
Note: Make sure that the code has not changed since you deployed the timer job; otherwise, the debugger will not match your source code to the deployed assembly.
  1. Ff798310.3aebdfeb-2b19-41aa-a8e2-431acfdc1185(en-us,PandP.10).png
  2. On the Debug menu, click Attach to Process.
  3. In the Attach to Process dialog box, click OWSTIMER.EXE, and then click Attach.
  4. If the Attach Security Warning dialog box is displayed, click Attach.
  5. In the SharePoint Central Administration Web site, click Monitoring, and then click Review job definitions.
  6. Click the name of your job, and then click Run Now on the Edit Timer Job page.
  7. Verify that the Visual Studio 2010 debugger stops execution on your breakpoint.


No comments:

Post a Comment

SharePoint Deployment Error : The specified path, file name, or both are too long.

Hi, Sometimes we get surprised with below error while deploying wsp file... Solution : To overcome with this issue, we just ne...