Показать сообщение отдельно
Старый 20.11.2013, 03:16   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
mfp: X++ Debugging Tips and Tricks #3–Conditional breakpoints
Источник: http://blogs.msdn.com/b/mfp/archive/...eakpoints.aspx
==============
The Dynamics AX Debugger doesn’t support conditional breakpoints. Once in a while this limitation can be quite annoying – but there is a simple workaround. The third trick in the series of X++ Debugging Tips and Tricks shows you how.

This trick requires code instrumentation – I strongly discourage using this trick on a production system. Only use this trick in a test or development sandbox!        

By using the breakpoint keyword, you can write X++ logic that triggers a breakpoint exactly as you want.

Consider this example. It is a recursive implementation of the mathematical function: Factorial. On a 32 bit system it will overflow when called with a sufficient high value. The example shows how to a breakpoint when an overflow occurs.

static void ConditionalBreakpointExample(Args args) { int factorial(int _value) { int result = 1; int prevResult; int i; for (i=1; i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.