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 |
|
1 | We list here some debugging methods of an administrative module. |
- | 2 | ||
2 | <ul><li>You can |
3 | <ul><li>You can add anywhere in a module file writen in wims language |
3 |
|
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 |
|
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 |
|
10 | the variable names replaced by their values. In the above example, the |
- | 11 | program displays for instance a debugging message containing <br/> |
|
6 |
|
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 |
|
15 | can be stored for debugging purposes in a special file named trace.txt |
9 |
|
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 |
|
18 | is executed from a server administrator IP and the debug mode is |
11 |
|
19 | enabled (it is then written $emph tmp_debug=yes$emphend in |
12 | log/wims.conf). |
- | |
13 |
|
20 | log/wims.conf). You can add a $emph tmp_debug_var$emphend variable to |
14 | and assign |
21 | the log/wims.conf file and assign to it as values the list of |
15 | when running the program. |
- | |
16 | </li><li> |
- | |
17 |
|
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> |