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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 11.01.2015, 18:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
goshoom: Tips for CIL debugging: Collection classes
Источник: http://dev.goshoom.net/en/2015/01/ci...g-collections/
==============

In some cases, you can make your debugging much easier if you debug CIL instead of the original X++ code. Working with collection classes (lists, maps, etc) is such a case.

For example, the following picture shows a map (mapping customer IDs to CustTable records, e.g. for caching) as displayed by the AX debugger:



If you do the same thing in CIL / Visual Studio debugger, it looks almost the same:



But there is one huge difference – unlike in AX, you can actually open the content of the collection. You can easily see the number of elements and you can open any of them and see the full object graph (such as fields of CustTable records, in our case).



The inability to see the content of collections in AX debugger can be quite annoying. You can’t simply see what’s inside; you need some code that explicitly iterates the collection. Debugging the CIL code instead of X++ can be much easier.

By the way, you can dig into many other things that looks atomic in X++. For example, utcdatetime is a primitive type in X++, but it’s a struct in CIL and you can see many properties unavailable in X++:





Источник: http://dev.goshoom.net/en/2015/01/ci...g-collections/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
mfp: X++ Debugging Tips and Tricks #4 - Reading uncommitted data Blog bot DAX Blogs 3 28.06.2014 00:24
emeadaxsupport: SEPA affected objects Blog bot DAX Blogs 0 29.11.2013 13:11
mfp: X++ Debugging Tips and Tricks Blog bot DAX Blogs 2 24.09.2013 13:01
X++: Changes to the Collection Classes in Dynamics AX 2012 Blog bot DAX Blogs 1 08.09.2011 09:37
Передача функции в качестве параметра lemchey_white DAX: Программирование 20 21.01.2008 22:51

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 23:06.