x++ code to get Call Stack without using debugger in AX 2012
Some Times you cannot use the debugger in the all environments.
But without using the debugger you can get call stack.
The following x++ code will help you in this case.
Add the example code to a method that is throwing an error.
container callStackCon;
int i;
Str msg;
callStackCon = xSession::xppCallStack();
for(i=1;i<=conlen(callStackCon);i++)
{
msg+ = conpeek(callStackCon,i);
}
info(msg);
But without using the debugger you can get call stack.
The following x++ code will help you in this case.
Add the example code to a method that is throwing an error.
container callStackCon;
int i;
Str msg;
callStackCon = xSession::xppCallStack();
for(i=1;i<=conlen(callStackCon);i++)
{
msg+ = conpeek(callStackCon,i);
}
info(msg);
Comments
Post a Comment