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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.04.2019, 11:11   #1  
Blog bot is offline
Blog bot
Участник
 
21,999 / 765 (69) +++++++
Регистрация: 28.10.2006
palleagermark: Debug Microsoft assemblies
Источник: https://www.agermark.com/2019/04/deb...ssemblies.html
==============

Recently I have had the need to understand what was going on inside one of the exchange rate import providers and also the security settings import. Both are only delivered as dll's, which you can find in the bin folder.

To see a decompilation of the code in the assembly, there are several different tools you can use to load it. These are the ones I have some experience with:

They all have that in common that you open the tool, select the dll of the assembly and let the tool decompile it. Here is an example of how that could look for the exchange rate provider I was looking into:




You can also use these tools to look into compiled label files. I sometimes use that when I need to find a particular translation. That could look like this (the language is danish if you wonder):






For the security settings import issue I had a need to debug it to figure what was going on, and in the following I'll try to explain how to do that in the most simple terms as possible.


To be able to debug you need to a have some symbol files. The .NET Reflector Visual Studio integration has a tool for generating these from the compiled dll:







In the following dialog you choose the assembly:






When the PDB's are generated, you can see that a new symbol location has been added to the debugger options:






A few other properties in the debugger options needs to set in a particular way:






Now just add a breakpoint to wherever X++ calls out to the assembly, and you are all set.


The experience it not totally perfect. The watch windows has problems with some variables and objects because of some "optimization" going on. Check the last link in this article, for a suggestion on how to deal with that.


You must be an administrator to install these tools on the developer box. That means the box must be cloud hosted and not Microsoft hosted.


As an MVP I have been offered a free license of .NET Reflector from Redgate. That is why I'm able to use this particular product for the example.


And I got great value from reading these blog posts, to figure how to setup .NET Reflector debugging:
.NET Reflector Pro: Debugging the .NET Framework Source Code
Disabling Optimizations when Debugging .NET Framework Source Code

Источник: https://www.agermark.com/2019/04/deb...ssemblies.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
palleagermark: Public Preview of the new Microsoft Dynamics AX is now available on PartnerSource and CustomerSource Blog bot Microsoft и системы Microsoft Dynamics 1 21.12.2015 13:30
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 17 Blog bot Dynamics CRM: Blogs 0 10.05.2014 06:30
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 16 Blog bot Dynamics CRM: Blogs 0 23.01.2014 03:15
emeadaxsupport: Translated User Help on TechNet and downloadable New Features lists available! Blog bot DAX Blogs 0 31.01.2013 05:11
crminthefield: Overview: Microsoft Dynamics CRM 4.0 Update Rollup 19 Blog bot Dynamics CRM: Blogs 0 26.08.2011 01:13
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

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