AX7: Quick and easy debugging
This purpose of this blog is to show how you can get quickly get started with debuggingin AX7, specifically by showing how you can debug an error message issued from AX.
So, let’s begin !
Imagine you are posting a Bank journal and you get the following error message upon posting ‘Currency EUR not allowed for account USMF OPER’
You would like to know the logic behind this error message, but need to trace in the code where it was issued from
We will use a classic debugging technique known from AX 2012 to demonstrate how this can be done quickly and easily, by inserting a breakpoint on the Info class to enable the debugger to track down in the code where the error is generated from.
These are the steps 1.Start Visual Studio as ‘Administrator’
2. Go to the Application explorer, go to the ‘Code’ node, select ‘Classes’ and locate the ‘Info’ class
On the ‘Info’ class rightclick and select ‘View code’
In the window that opens up, select the ‘Add’ method
3. Insert your breakpoint on the ‘Add’ method by pressing ‘F9’
4. Press ‘Debug’ from the toolbar and select ‘Attach to process’
In the ‘Attach to process’ screen mark ‘Show processes from all users’ and then browse to the process ‘w3wp.exe’
Wait for the Symbols to load
5. Once the symbols have loaded repeat the application procedure, eg. in this case we will post the journal again to generate the error message
And note that almost immediately the debugger starts executing in Visual Studio
I copy the call stack into Notepad and here I note especially the highlighted line as this is the line that is triggered just before the call to the Infolog code
I can see that the error is triggered on the BankAccountTable, checkCurrency method on line 225 and I stop debugging
I go to this code to study the method
I open up the BankAccountTable and similar to as on the ‘Info’ class I select ‘’ and open the method I am interested in
Here naturally ‘checkCurrency’
And we can study the code that generated the error message
Naturally, you can use the same technique to insert breakpoints in other places of the code such as on ‘init’, ‘update’ and ‘insert’ methods etc
Happy debugging !
AX7: Quick and easy debugging的更多相关文章
- Quick and Easy Installation of Oracle Database 12c on Oracle Linux in Oracle VM VirtualBox
发贴人 Sergio-Oracle 于2018-4-18 23:10:15在Oracle Linux Introduction How Does This Work? Requirements Bef ...
- Awesome Go精选的Go框架,库和软件的精选清单.A curated list of awesome Go frameworks, libraries and software
Awesome Go financial support to Awesome Go A curated list of awesome Go frameworks, libraries a ...
- Dom4j quick start guide
Parsing XML Using Iterators Powerful Navigation with XPath Fast Looping Creating a new XML document ...
- (转) [it-ebooks]电子书列表
[it-ebooks]电子书列表 [2014]: Learning Objective-C by Developing iPhone Games || Leverage Xcode and Obj ...
- SubSonic指南中文版
翻译:王鹏程张原 王伟策划:毛凌志2009年1月北京工业大学软件学院PS:有问题反馈至http://lexus.cnblogs.comGetting Started with SubSonicBy S ...
- RFID 仿真/模拟/监控/拦截/检测/嗅探器
Sound card based RFID sniffer/emulator (Too tired after recon.cx to do draw the schematics better th ...
- github上所有大于800 star OC框架
https://github.com/XCGit/awesome-objc-frameworks#awesome-objc-frameworks awesome-objc-frameworks ID ...
- Learning WCF Chapter1 Generating a Service and Client Proxy
In the previous lab,you created a service and client from scratch without leveraging the tools avail ...
- Frontend Development
原文链接: https://github.com/dypsilon/frontend-dev-bookmarks Frontend Development Looking for something ...
随机推荐
- Equls 和==的区别
对于值类型,如果对象的值相等,则相等运算符 (==) 返回 true,否则返回 false.对于string 以外的引用类型,如果两个对象引用同一个对象,则 == 返回 true.对于 string ...
- XJOI‘s story (不定期连载)
王城双基的力量.... 我也不知道写写这种东西会不会被查大表..尴尬 . 我为什么要写这东西: 为了蛤鸡 为了红太阳 xj 人物列传 2017 1,6 Friday 得到大新闻 机房后面的监 ...
- 正则表达式测试器 beta_
说明:"言简意赅".简而从之:如题※网上已经有很多正则的测试工具了※感谢小Z推荐了一款非常好的(但是个别子匹配项多时卡顿.应该是我的表达式问题)故而花了点时间照着“抄”了一个,并配 ...
- HDU 5970 最大公约数
中文题 题意: 思路: 1.观察可得 模m的同余系和m的gcd都相同(这题多了一个c也是相同的) 2.由于取证所以不能用简单的用O(m^2)的做法,涉及到多1少1的 3.打表观察,例如i为模9为7的数 ...
- [BZOJ 3681]Ariettad
终于是打完了 CH 上的数据结构专场了…… 不过看样子还有一套 5555 传送门: http://ch.ezoj.tk/contest/CH%20Round%20%2351%20-%20Shinrei ...
- AutoLearnSkills.lua --升级自动学习技能
--[[作者信息: Auto Learn SKills (升级自动学习技能) 作者QQ:247321453 作者Email:247321453@qq.com 修改日期:2014-3-12 功能:在玩家 ...
- 想让你的java代码更漂亮,用枚举吧
枚举是java 5之后添加的一个重要特性,这个特性不能提高性能,但是能让java程序员写出更优雅的代码. 我之前看到过挺多介绍java枚举的不错的帖子,我也来参与以下这个话题. 1. 枚举基本用法 / ...
- winform中固定界面大小的方法
Step1: MaximizeBox : False MinimizeBox : False Step2: FormBoarderStyle : FixedSingle
- N个节点的二叉树有多少种形态
来源:http://www.cnblogs.com/ShaneZhang/p/4102581.html 这是一道阿里的面试题.其实算不上新鲜,但是我之前没关注过,如今碰到了,就顺便探讨下这个问题吧:) ...
- python3-day3-python基础3
一.字典 key:valuekey定义规则:1.必须是不可变的:数字,字符串,元祖,可hash2.key是唯一的 ,不可重复 value定义规则:任意类型增:dic["key"]= ...