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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 23.09.2009, 13:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,607 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Debugging non-interactive X++ code in Dynamics AX 2009 when running on Windows Server 2008
Источник: http://blogs.msdn.com/emeadaxsupport...rver-2008.aspx
==============

The most common scenario for a Dynamics AX developer is that you create your X++ code and objects in the Dynamics AX Client and test them in the same interactive session. In other words you start executing your new code from within the Dynamics AX Client and if necessary debug the code by putting in some breakpoints and wait for the Dynamics AX Debugger to hit them.

There are however also scenarios where the code you have developed needs to be executed in a non-interactive session, and with the release of Dynamics AX 2009 the chances to get confronted with this are much higher because the concept of Batch Jobs has changed.

Unlike earlier versions of Dynamics AX you don’t need to have in Dynamics AX 2009 a Batch Client running any more, as the AOS is now responsible for executing Batch Jobs (that support the new Batch Framework).

The important part is that the X++ code of the Server Batch Jobs is executed on the AOS in a non-interact session, and this changes also the way how you need to debug the X++ code.

The easiest way is still trying to avoid the non-interactive part, in other words trying to execute the code running in the non-interactive session in an interactive session by creating some helper/wrapper classes and calling them from the Dynamics AX Client. However sometimes the error you are facing does only occur in the non-interactive session.

You can still instrument your code (build in some logging) and evaluate the output (log), however still you can reach a point where you have no other choice than debugging the code in the non-interactive session. For those of us that have developed Enterprise Portal Web Forms in the past the concept is very similar, as here you are also dealing with a non-interactive session.

In order to do non-interactive debugging, you need to prepare your environment and make some configuration changes. I don’t want to go into too much detail what you have to do, as I found some excellent posts and just want to refer to them instead:

Once you have set up everything correctly, you might however face the issue that the Dynamics AX 2009 Debugger does not stop at your breakpoint.

This is the case when either the AOS for Server Batch Jobs or the .NET Business Connector for Enterprise Portal are running on Windows Server 2008. In this environment the Dynamics AX 2009 Debugger will never connect to your non-interactive session and so never hit any breakpoint!

There was recently the Hotfix KB962952 released for Dynamics AX 2009 SP1 that addresses this issue. If you want to debug X++ code in a non-interactive session in Dynamics AX 2009 and you are running on Windows Server 2008 you need to install this Hotfix!

Once the Dynamics AX 2009 Debugger is attached to your non-interactive session the experience you get is the same as if you would debug interactive sessions.



Источник: http://blogs.msdn.com/emeadaxsupport...rver-2008.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Dynamics AX Sustained Engineering: Microsoft Dynamics AX 4.0 and AX 2009 are compatible with Microsoft Windows 7 and Microsoft Windows Server 2008 R2 Blog bot DAX Blogs 0 22.09.2009 04:06
emeadaxsupport: Debugging Microsoft Dynamics AX 2009 SSRS reports with Microsoft Visual Studio 2008 Blog bot DAX Blogs 0 26.07.2009 15:07
gatesasbait: Dynamics AX 2009 SSRS and SSAS Integration Tips Blog bot DAX Blogs 3 09.07.2009 13:07
jinx: Microsoft Dynamics AX 2009, Windows Server 2008 und SQL Server 2008 Blog bot DAX auf Deutsch 0 12.10.2008 20:10
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, время: 21:52.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.