Rev 15174 | Rev 15573 | 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 |
||
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 |
||
10 | the variable names replaced by their values. In the above example, the |
||
11 | program displays for instance a debugging message containing <br/> |
||
12 | $emph The score of Ted Watson is 7$emphend <br/> </li> |
||
13 | |||
14 | <li> All files and line numbers processed when we issue a wims command |
||
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 |
||
19 | enabled (it is then written $emph tmp_debug=yes$emphend in |
||
20 | log/wims.conf). You can add a $emph tmp_debug_var$emphend variable to |
||
21 | the log/wims.conf file and assign to it as values the list of |
||
22 | variables whose evolution you want to know when running the program. |
||
15174 | bpr | 23 | </li> |
15185 | reyssat | 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. |
||
27 | </li> </ul> |