Changes between Initial Version and Version 1 of HowToDebug


Ignore:
Timestamp:
Jul 8, 2008, 6:11:29 PM (16 years ago)
Author:
rjwalker
Comment:

Initial version

Legend:

Unmodified
Added
Removed
Modified
  • HowToDebug

    v1 v1  
     1= How to debug GeoNetwork =
     2
     3== Debugging Java ==
     4
     5The easiest way to debug Java code is to add some logging statements
     6to the code.  (Sigh.)
     7
     8== Debugging XSLT scripts ==
     9
     10Much of GN's functionality is implemented through XSLT scripts
     11that are applied to the XML output of some Java code.
     12It is possible to see that XML output and run an XSLT script
     13on it independently.
     14The best way to do this is to enable Jeeves debugging.
     15In `web/geonetwork/WEB-INF/config.xml`, in the `<general>`
     16section, set `<debug>true</debug>` and restart GN.  Then
     17you can add an exclamation mark (`!`) to the end of the
     18name of a service to view the intermediate XML.
     19For example, if you bring up the GN home page in your
     20browser, the URL will end in `...main.home`.  Edit the
     21URL to `...main.home!` and press Enter.  The intermediate
     22XML for this page will (eventually) be displayed.  You
     23can save this to a file and then use the command-line
     24version of Xalan on it.  (For `main.home`, the script
     25to use is `main-page.xsl`, as specified in the
     26`config.xml` file.)
     27
     28
     29== Debugging in the browser ==
     30
     31Changes/additions to layout and interactivity
     32have to be tested in browsers.
     33The means of testing and debugging in a
     34browser varies from browser to browser.
     35
     36=== Firefox ===
     37
     38   * [http://getfirebug.com/ Firebug] gives you tools to debug HTML, CSS, !JavaScript - far too many to list here
     39   * [http://chrispederick.com/work/web-developer/ Web Developer] is great for debugging the visual aspects of GN output, e.g., the layout
     40     of forms and tables
     41
     42=== Internet Explorer ===
     43
     44   * [http://getfirebug.com/lite.html Firebug Lite] gives you just the console from Firebug, which might be enough to fix a problem
     45   * [http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en Internet Explorer Developer Toolbar]
     46     provides some Firebug-like tools, but no !JavaScript debugger
     47   * Microsoft Script Editor, which comes with Office, provides a full !JavaScript debugger like the one in Firebug.
     48