/
Debug.shtml
99 lines (80 loc) · 3.8 KB
/
Debug.shtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.17), see www.w3.org">
<title>JMRI: DecoderPro User Guide - Debugging</title>
<!-- Style -->
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
<link rel="stylesheet" type="text/css" href="/css/default.css"
media="screen">
<link rel="stylesheet" type="text/css" href="/css/print.css"
media="print">
<link rel="icon" href="/images/jmri.ico" type="image/png">
<link rel="home" title="Home" href="/"><!-- /Style -->
</head>
<body>
<!--#include virtual="/Header" -->
<div id="mBody">
<!--#include virtual="Sidebar" -->
<div id="mainContent">
<h1>JMRI: DecoderPro User Guide</h1>
<h2>Debugging</h2>
<dl>
<dt class="left">While the program is running</dt>
<dd class="first">
<p>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.</p>
<p>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</p>
<p class="example">log4j.rootCategory= WARN, A1</p>
<p>to include the additional logging destination "R":</p>
<p class="example">log4j.rootCategory= WARN, A1,R</p>
<p>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.</p>
<p class="example">log4j.rootCategory= INFO, A1</p>
<p>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.</p>
</dd>
<dt class="left">Debugging problems with XML files</dt>
<dd>
<p>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.</p>
<p>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 Decoder Pro.</p>
<p>Note that Explorer needs to see both the .xml file,
plus the definition information in the .dtd file. If you
get a message like "error in system resource", you need
to put a copy of the associated .dtd file (e.g.
decoder-config.dtd) in the directory with your new file.
DTD's can be found in the dtd subdirectory of the xml
directory.</p>
</dd>
</dl><!--#include virtual="/Footer" -->
</div><!-- closes #mainContent-->
</div><!-- closes #mBody-->
</body>
</html>