Question Status

Verified
FrancisDucharme asked a question on 7 May 2013 1:48 PM

Hello,

I'm pretty new in AX and I'm trying to see the actual line that's causing a certain error to be logged into a report/journal (121: File not found).

Is there any way to set the debugger to break on all exception/errors ? There's this class with a dozen of methods and I have no clue where to start inserting a breakpoint which is why I'd like the debugger to break by itself, just like in Visual Studio.

Is that even possible ?

Thanks!

Reply
Verified Answer
Joris de Gruyter responded on 8 May 2013 8:26 AM

You can just click on one object in the AOT, and then start typing, that will take you there.

The reason it's at the bottom is because it's a kernel-level class. There's a few other down there as well :-)

Reply
Suggested Answer
Joris de Gruyter responded on 7 May 2013 2:20 PM

There's no way to really do this. However, if your error is actually also sending a message to the infolog, you can add a breakpoint in the info class add method. You'll be able to see the stack of where it's being called from.

Reply
Suggested Answer
Joris de Gruyter responded on 7 May 2013 2:20 PM

There's no way to really do this. However, if your error is actually also sending a message to the infolog, you can add a breakpoint in the info class add method. You'll be able to see the stack of where it's being called from.

Reply
FrancisDucharme responded on 8 May 2013 6:52 AM

Thanks sounds great Joris, but unfortunately, I can't find the info class in the AOT tree :(

Reply
FrancisDucharme responded on 8 May 2013 7:02 AM

Nevermind, it's at the bottom of the tree, not in alphabetical order for some reason :\

Reply
Verified Answer
Joris de Gruyter responded on 8 May 2013 8:26 AM

You can just click on one object in the AOT, and then start typing, that will take you there.

The reason it's at the bottom is because it's a kernel-level class. There's a few other down there as well :-)

Reply
FrancisDucharme responded on 8 May 2013 9:11 AM

Turns out I put a breakpoint in another class/method (because the Info class is not used in this case) and was able to work up the strack trace. Your suggestion was of great help.

Reply