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 ...
随机推荐
- HTML5 3D爱心动画 晚来的七夕礼物
在线演示源码下载 这么好看的HTML5爱心动画,我们当然要把源代码分享给大家,下面是小编整理的源代码,主要是HTML代码和CSS代码. HTML代码: <div class=’heart3d’& ...
- CE 内存申请
char ch_ReadByte='H'; char *ptr_OneLineData; unsigned ); if ((ptr_OneLineData = (char *)malloc(bufsi ...
- Linear Algebra lecture6 note
Vector spaces and subspaces Column space of A solving Ax=b Null space of A Vector space requiremen ...
- vs安装失败,发生严重错误,错误号:Error 0x80070643
发生这个的原因很大的可能是vs安装的目录不是系统默认目录,改一下就好了. C:\Program File(x86) 不要看网上那些没有的,都TM骗人的. 不要问我是怎么知道的,你只要知道我的电脑让我重 ...
- python 3 学习笔记(一)
由于之前学过python2,因此今天就想记录下第一天学习python3过程中的遇到的不同和之前没有太掌握的基础知识. python2和python3的语法区别 print语句 在Python2里,pr ...
- Java相关
1.多线程实现方法? 1).继承Thread类实现多线程 2).实现Runnable接口方式实现多线程 3).使用ExecutorService.Callable.Future实现有返回结果的多线程 ...
- POJ做题笔记:1000,1004,1003
1000 A+B Problem 题目大意:输入两个数a和b,输出他们的和. 代码: #include <stdio.h> int main() { int a, b; while (sc ...
- MyBatis入门学习教程-调用存储过程
一.提出需求 查询得到男性或女性的数量, 如果传入的是0就女性否则是男性 二.准备数据库表和存储过程 create table p_user( id int primary key auto_incr ...
- 解决VS下“LC.exe已退出,代码为-1”问题
今天使用VS2015开发一个Winform程序,手一抖拖错了一个第三方控件,然后将其去掉并删除相关的引用,结果导致了LC.exe错误:"Lc.exe已退出,代码为-1 ". 经过上 ...
- EL总结
El: 1.el表达式语言(是什么) 2.el是书写到jsp页面 3.el语法格式${ } 4.el算数运算(+,-,*,/,%), 逻辑运算(&&,||,!), 关系运算(>, ...