AgileApps Support Wiki Pre Release

Difference between revisions of "Java Debugging Tips"

From AgileApps Support Wiki
imported>Aeric
(Created page with "To debug a Java class: :* Add messages to the debug log using :: <tt>Logger.info("message text", "message type");</tt> :: (Use the message type for searching, when needed.) ...")
 
imported>Aeric
Line 5: Line 5:


:* Open the debug log in a separate page:
:* Open the debug log in a separate page:
::* C
::* Go to '''[[File:GearIcon.png] > Developer Resources > Debug Log'''
::* lick on Debug Log in the sidebar to refresh
::* To refresh the page, click '''Debug Log''' in the sidebar.


:* Display a note at the top of the user's page with
:* Display a note at the top of the user's page with

Revision as of 00:24, 10 September 2013

To debug a Java class:

  • Add messages to the debug log using
Logger.info("message text", "message type");
(Use the message type for searching, when needed.)
  • Open the debug log in a separate page:
  • Go to [[File:GearIcon.png] > Developer Resources > Debug Log
  • To refresh the page, click Debug Log in the sidebar.
  • Display a note at the top of the user's page with
Functions.showMessage("message text");
  • Abort processing and display and error message using:
Functions.throwException("message text");
Learn more: The Class Template has code that uses those techniques.