Subversion Repositories wimsdev

Rev

Rev 15174 | Rev 15573 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15174 Rev 15185
Line 1... Line 1...
1
To debug in an administrative module, several possibilities.
1
We list here some debugging methods of an administrative module.
-
 
2
 
2
<ul><li>You can set the command $emph !debug$emphend
3
<ul><li>You can add anywhere in a module file writen in wims language
3
in the chosen location of the module files followed by variable names
4
(this excludes for instance shell files) a line starting with the
-
 
5
command $emph !debug$emphend , followed by a string that may contain
-
 
6
variable names (preceeded by a $$ sign) to get their values. For
4
that you want to get value. The program will stop there
7
instance :<br/> $emph !debug The score of $$user is $$score $emphend
-
 
8
<br/> If the program execution tries to execute such a line, it will
-
 
9
stop there, displaying an error message containing your string with
5
if the execution passes it through and then displays the values of the variables
10
the variable names replaced by their values. In the above example, the
-
 
11
program displays for instance a debugging message containing <br/>
6
in question.
12
$emph The score of Ted Watson is 7$emphend <br/> </li>
7
</li><li>
13
 
-
 
14
<li> All files and line numbers processed when we issue a wims command
8
The number of the file lines in which the program runs are in
15
can be stored for debugging purposes in a special file named trace.txt
9
the file trace.txt of the tmp/sessions/XXXX directory where XXXX is the session number,
16
in the tmp/sessions/XXXX directory where XXXX is the session
-
 
17
number. This debugging trace is in action each time the wims command
10
each time the program is executed from a server administrator IP and if the
18
is executed from a server administrator IP and the debug mode is
11
the debug mode is enabled (it is then written $emph tmp_debug=yes$emphend in
19
enabled (it is then written $emph tmp_debug=yes$emphend in
12
log/wims.conf).
-
 
13
You can add a $emph tmp_debug_var$emphend variable to the log/wims.conf file
20
log/wims.conf).  You can add a $emph tmp_debug_var$emphend variable to
14
and assign to it as values the list of variables whose evolution we want to know
21
the log/wims.conf file and assign to it as values the list of
15
when running the program.
-
 
16
</li><li>
-
 
17
In debug mode, peripheral software error messages are displayed at the bottom of
22
variables whose evolution you want to know when running the program.
18
the html page.
-
 
19
</li>
23
</li>
-
 
24
 
-
 
25
<li> When the server is configured to be in debug mode, peripheral
-
 
26
software error messages are displayed at the bottom of the html page.
20
</ul>
27
</li> </ul>