Total Pageviews

Search This Blog

Wednesday, December 15, 2010

[Updated] How to Debug Batch Jobs running on Dynamics AX 2009 with AOS Server on Windows Server 2008

I'm having a hard time debugging batch jobs on server, my batch job executes but it never hits the breakpoint.

I followed all the steps mentioned in this blog post

and additionally installed the hotfix as our AOS Server runs on Windows Server 2008, but still unable to hit the breakpoint.

Just wondering, if anybody out there has achieved success in debugging batch jobs on AOS Server (which runs Windows Server 2008)? If yes, would be glad if they can share their experiences or email me on maildotdilipnATgmaildotcom or put a comment below. Thanks

Thanks to all who replied me via emails and comments. Appreciate it.

Solution (If you debugging batch jobs on Windows Server 2008)

a. Make sure you have checked all the steps

b. Run the hotfix mentioned in the blog link above
c. Logon to your remote desktop using (mstsc /console)
d. Run the Debugger As Administrator i.e. right click AxDebug. exe and Run as Administrator.
Observation - It's not necessary to logon with the same account as your AOS Service account, I logged in with my network alias which happened to be the admin on the box and it worked well for me, Usually in strict environments we won't get access to the service account's password.
In my scenario, I missed Steps c and d. This is required if you run on Win Server 2008


denisfed said...

Well, I did it couple of time. The main point missed from the MSDN blog post, you are referring to, is that if you debugging it from remote desktop (which is usually a case), you MUST run remote desktop client (dtsc.exe) with -console switch.
Also, I find the idea to switch ax32serv.exe service user to your account to be a quite peculiar. It is much better to run AOS service under some designated domain user account, who also have corresponding user record in Axapta, belonging to Admins group, of course.


Saelen Kenny said...

I have done this several times also, and indeed the location of de debugger etc.. is important, but there is one vital part misisng here.. Yout need a patch to make it work on Win2008.

I have posted this on my blog a while ago. You can find it here :

Saelen Kenny said...

Sorry for my previous comment, it was concerning debugging the AIF,

But basically it is the same for debugging batches (except for the run as part)

You also need a hotfix for this one. (KB962952)

kind regards,

Gary said...

Thanks, was going crazy trying to figure this out.

wojzeh said...

saved my day!