Subversion Repositories wimsdev

Rev

Rev 15653 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
15185 reyssat 1
We list here some debugging methods of an administrative module.
2
 
3
<ul><li>You can add anywhere in a module file writen in wims language
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
17228 bpr 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
15185 reyssat 9
stop there, displaying an error message containing your string with
10
the variable names replaced by their values. In the above example, the
17228 bpr 11
program displays for instance a debugging message containing <br>
15573 bpr 12
$emph The score of Ted Watson is 7$emphend
13
</li><li>
14
All files and line numbers processed when we issue a wims command
15185 reyssat 15
can be stored for debugging purposes in a special file named trace.txt
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
18
is executed from a server administrator IP and the debug mode is
15573 bpr 19
enabled (it is then written $emph tmp_debug=yes$emphend in log/wims.conf).
20
You can add a $emph tmp_debug_var$emphend variable to the log/wims.conf file
15653 reyssat 21
and assign to it the list of variable names whose evolution you want
15573 bpr 22
to know when running the program. You can also add a $emph tmp_debug_use_var$emphend
15653 reyssat 23
variable to the log/wims.conf file and assign to it a list of variable names:
24
each time one of these variables is used, its value is put in the debugging trace.
15573 bpr 25
</li><li>
26
When the server is configured to be in debug mode, peripheral
15185 reyssat 27
software error messages are displayed at the bottom of the html page.
28
</li> </ul>