Friday, March 5, 2010

xSession::xppCallStack method

This method allows to get the current call stack - all caller method names and line numbers. For example, calling xSession::xppCallStack() from the line 13 at the Tutorial_RunbaseBatch.dialog() method will give the following call stack:

Actually I even found one nice practical application for it - SysTestAssert class can be modified so that it will display the line number where assertion has failed. It becomes much easier to debug unit tests with such modification.

7 comments:

  1. Agreed, the callstack can be used for many tricks.
    However, for the unit test example you mention, just double-click the line in the infolog and it will open the editor with the failing assert in focus.

    ReplyDelete
  2. Wow! Thanks for mentioning that. I've never used it before.

    ReplyDelete