AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 26.04.2012, 19:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,574 / 848 (80) +++++++
Регистрация: 28.10.2006
ax-erp: Step-by-Step Checklist for Debugging Batch Jobs in Dynamics Ax
Источник: http://microsoft-dynamics-ax-erp.blo...debugging.html
==============


A. Enable Global Breakpoints


When debugging in the client, you want to set breakpoints that can be caught by the debugger. The following steps show how.


1.Launch the Microsoft Dynamics AX Configurationtool from the Start > Administrative Tools menu on your client computer. The first time this tool opens, you will be on the Original configuration. Create a new configuration named Debug. Click Manageand choose the Create Configurationmenu option.


2.Enter a new name such as Debug, and choose copy from Original configuration and click Ok.


3.A new configuration is created and shown in the configuration tool. Click the Developer tab.


4.Choose the following options:
·“Enable global breakpoints to debug code running in the Business Connector or client” (required for this scenario)
·“Enable user breakpoints to debug code in the Business Connector” (optional for this scenario)


Note: Take special care that the Configuration Target remains set to Local Clientsince this is the only client you can set global breakpoints from.




B. Configure Your AOS to Run Under Your User Credentials


1.Launch the Services utility on your AOS server machine, and choose the AOS instance that you are configuring for debugging.


2.Right-click on your chosen AOS instance name and choose Properties. On the properties window, choose the Logon tab. Select “This account” for the Logon As option. Enter your full Domain account {e.g. contoso\YourName } and password credentials. This account must be the same user account as the account used for debugging batch code.


3.Click Apply once you have modified the user account.


4.You will be prompted to restart the service. Choose yes to restart the service (note: ensure other users are not working on this service before restarting it).




C. Configure the Dynamics AX Server to Enable Debugging


1.From your Start > Administrative Tools menu, open the Microsoft Dynamics AX Server Configuration tool. This tool has the same option to Manage configurations that you saw earlier in the client configuration tool.


2.Choose the Manage and Create Configurationoption to create a new server configuration. As before, copy from the original configuration and choose Debug as the name.


3.Verify the AOS instance matches the instance you want to use for debugging.


4.Choose the following options:
·“Enable breakpoints to debug X++ code running on this server” (required for this scenario)
·“Enable global breakpoints to debug X++ code running in batch jobs” (required for this scenario)


Note: When you click Apply, you will be prompted to restart the service, and you should choose Yes.




D. Set breakpoints and start debugging.


1.Launch the Dynamics AX Client from the Start menu, and open the developer workspace.


2.Open the class you would like to debug from the AOT and set breakpoints at desired locations.


3.Launch the Dynamics Ax Debugger from the Start menu. The debugger must be opened directly in order to find and catch global breakpoints.


4.Schedule the batch job to run.


Example: To schedule work calendar delete to run in batch; launch the WorkCalendarDelete class in the AOT, click Batch tab, check Batch Processing check box and click Ok.


5.Wait for the debugger to catch the breakpoints.




E. Version information.
Batch debugging on Windows Server 2003 works with Dynamics Ax 2009. However, a hot fix (from partners site) is needed for Windows Server 2008. The next release of Dynamics Ax will include a fix for both operating systems (2003 and 2008).



Источник: http://microsoft-dynamics-ax-erp.blo...debugging.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 26.04.2013, 10:41   #2  
Romb is offline
Romb
Участник
Аватар для Romb
 
79 / 22 (1) +++
Регистрация: 06.01.2004
Alos important within user session into batchserver run AxDebug "As administrator" (in context menu).
In my case, such action allow to catch breakpoint, only. If you directly run debugger from AX client breakpoint does not work!!!
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
dynamics-ax: Interview with Microsoft's Lachlan Cash on his new role, AX 2012 and more Blog bot DAX Blogs 6 22.04.2011 14:55
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
X++: Step-by-Step Checklist for Debugging Batch Jobs in Dynamics Ax Blog bot DAX Blogs 0 26.06.2009 10:05
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 06:06.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.