在Dynamics AX中进行调试 [英] Debugging in Dynamics AX

查看:147
本文介绍了在Dynamics AX中进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在学习时还面临一些麻烦,所以我猜测一旦玩大孩子,它就会变得更糟:动态中的警告并不像VS那么精确和翔实,没有鼠标悬停技巧,和异常,告诉我我错了哪里。
我只是习惯于Visual Studio,它是智能感知和所有的工具(与Visual Studio相比,动态相当新颖)



比解决简单代码问题,我想学习如何解决我可能在代码中没有写的代码,或者我在Visual Studio中在3分钟内解决的任何其他东西,以及如何在动力学中生存的提示,而不是全部Visual Studio工具。

解决方案

Dynamics AX中的代码编辑器有一些智能感知,键入表或类变量的名称由。或者::将给你一个可用于该项目的字段或方法的列表。键入(启动方法调用)后,将弹出一个工具提示,该方法可以使用参数。启动新行时,可以右键单击并列出表,列表​​类,列表类型等。大多数命令也是可通过快捷键获得注释只有在方法中所有代码到游标位置的语法正确的情况下,智能感知才有效。



确保您已经更新了开发环境中的交叉引用(工具/开发工具/交叉引用/定期/更新)通过更新的交叉引用,您可以右键单击AOT中的任何表,字段,类,方法,扩展数据类型或枚举,然后选择加载项/交叉引用/用于查看系统中使用的项目。



您还可以使用工具/开发工具/代码浏览器查看应用程序的源代码所有类型,变量和方法变成超链接,以便您可以点击右键定义该项。



另一个有用的工具是应用程序层次结构树,可以在工具/开发工具,或右键单击加载项菜单。这将显示您的类层次结构,因此您可以轻松地看到,SalesFormLetter派生自FormLetter,它来源于RunBaseBatch。



在编辑器中,您可以突出显示文本,然后右键单击查找属性/方法或查找定义。



如果您尝试跟踪系统中某个特定信息消息的生成位置,则有两种策略使用:


  1. 在方法Info.add()的第一行
    上设置一个断点。然后当
    运行生成
    消息的代码时,一旦infolog是
    生成,您将弹出
    调试器。然后,您可以在调试器中查看堆栈
    trace,以查看代码是
    生成消息的位置。


  2. 运行工具/ Development
    工具/ Label / Label编辑器,并为消息文本搜索
    。选择
    消息的标签ID,然后
    单击使用以查看系统中使用
    消息的位置。



I'm facing some troubles still while learning, so I guess it tends to get worse once I play with the big kids: warnings in dynamics aren't as precise and informative as VS's, there are no mouse-over tips, and exceptions to show me exactly where I've got it wrong. I'm just too used to Visual Studio, it's intellisense and all the tools (dynamics is quite new when compared to Visual Studio)

More than solving simple code issues, i'd like to learn how to solve upcomming ones i might have in code not written by me or anything else i'd solve in 3 minutes in Visual Studio, as well as tips on how to survive in dynamics ax without all the Visual Studio tools.

解决方案

The code editor in Dynamics AX has some intellisense, typing the name of a table or class variable followed by . or :: will give you a list of fields or methods available for that item. After you type the ( to start a method call, a tooltip pops up with parameters available on that method. When starting a new line, you can right click and List Tables, List Classes, List Types, etc. Most of those commands are also available via Shortcut Keys. Note that the intellisense only works if all the code in the method up to the location of your cursor is syntactically correct.

Make sure you have updated the cross reference in your development environment (Tools/Development tools/Cross-reference/Periodic/Update). With an updated cross reference, you can right click an any table, field, class, method, extended data type, or enum in the AOT and choose Add-Ins/Cross-reference/Used by to see where that item is used in the system.

You can also use Tools/Development tools/Code explorer to view the source to the application with all types, variables, and methods turned into hyperlinks so you can click to go right to the definition of that item.

Another useful tool is Application hierarchy tree, available either under Tools/Development tools, or on the right click Add-Ins menu. This will show you the class hierarchy, so you can easily see, for example, that SalesFormLetter derives from FormLetter, which derives from RunBaseBatch.

In the editor, you can highlight text and right click to Lookup Properties/Methods or Lookup Definition.

If you are trying to track down where in the system a particular infolog message is generated there are two strategies to use:

  1. Set a breakpoint on the first line of the method Info.add(). Then when you run the code generating the message, you will pop into the debugger as soon as the infolog is generated. You can then look at the stack trace in the debugger to see where the code is that generated the message.

  2. Run Tools/Development tools/Label/Label editor and search for the text of the message. Select the Label ID of the message, then click Used by to see where that message is used in the system.

这篇关于在Dynamics AX中进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆