locked
Debug Timer Job on Windows 7 RRS feed

  • Question

  • Hi all

    I have created a timer job and i am able to debug the job by adding "Debug.Assert(false)" line, i works well in windows server 2003 but not in Windows 7, i am just wondering if anyone has used this method to debug the timer service on windows 7?

    Wednesday, December 22, 2010 11:21 AM

Answers

  • hi

    you can debug timer jobs without Debug.Assert(). In order to do this you need to manually attach Visual Studio debugger (via Debug > Attach to process > OWSTimer.exe) and set breakpoints in your code. When job will be triggered (you can force it) - execution will be paused on your breakpoint.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com
    • Marked as answer by Shafaqat Wednesday, December 22, 2010 12:41 PM
    Wednesday, December 22, 2010 11:46 AM

All replies

  • hi

    you can debug timer jobs without Debug.Assert(). In order to do this you need to manually attach Visual Studio debugger (via Debug > Attach to process > OWSTimer.exe) and set breakpoints in your code. When job will be triggered (you can force it) - execution will be paused on your breakpoint.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com
    • Marked as answer by Shafaqat Wednesday, December 22, 2010 12:41 PM
    Wednesday, December 22, 2010 11:46 AM
  • OWSTimer.exe is not available in the process list.
    Wednesday, December 22, 2010 12:37 PM
  • i have found owstimer.exe and now able to debug, thanx.
    Wednesday, December 22, 2010 12:41 PM