JMRI® is...
DecoderPro®
Advanced
Applications
By the community of JMRI.org:
Tools
JMRI tools for working with your layout:
Layout Automation
Use JMRI to automate parts of your layout and operations:
Supported hardware
JMRI supports a wide range of devices, DCC systems, command stations, networks, and protocols.
JMRI Setup and Installation
JMRI environments...

JMRI Help:

Contents Index
Glossary FAQ

Donate to JMRI Donate to JMRI.org

JMRI: DecoderPro User Guide

Debugging

While the program is running

While the program is running, debugging information is printed to "standard output", which is in different places depending on what operating system you're using and how you started the program. On a Macintosh classic, it appears in a window that's created with the first error message. With Mac OS X, it may appear in a new window, or you may have to launch the "Console" application to see it. On Windows, you may have to run one the "Debug" batch files to see the error messages; look for them in the application's directory.

Error logging is controlled by the "default.lcf" file. It has lots of comments on what the various terms mean. If you'd like messages to be logged to a file, change the line

log4j.rootCategory= WARN, A1

to include the additional logging destination "R":

log4j.rootCategory= WARN, A1,R

R is defined later in default.lcf as logging to the "example.log" file. You can also get a lot of additional information on what the program is doing by setting the log level to either INFO or DEBUG, e.g.

log4j.rootCategory= INFO, A1

Note that the DEBUG level will output a lot of information, and will slow down operation significantly. Its also possible to request more information on just parts of the program, but in order for that to be useful you have to have spent some time learning about the internals.

Debugging problems with XML files

When an XML file can't be parsed, you'll get some hard-to-understand error messages. The most important part of this is the line number. Use that to start looking for the problem.

You might be able to get better debugging information by trying to open the file with Internet Explorer. The debugging information it provides is generally more detailed than that provided by the XML routines in the JDOM libraries used by JMRI and DecoderPro.

Note that Explorer needs to see both the .xml file, plus the definition information in the .xsd Schema file. If you get a message like "error in system resource", you need to put a copy of the associated .xsd file (e.g. decoder-config.xsd; see the top few lines of your file) in the directory with your new file. Schema .xsd's can be found in the Schema subdirectory of the xml directory.