This is a good link for the to know about some tricks while debugging in AX 2012 X++ code or program.
Debugging managed code in AX 2012
Debugging managed code in AX 2012
Technical Tutorials x++,tips on issues or troubleshooting On Ax ERP ,Microsoft Dynamics 365,Ax 2012,Microsoft , U.S.,Business Software solution.