Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /usr/doc/slang-1.4.5/html/ drwxr-xr-x | |
| Viewing file: Select action/file-type: 17. Debugging
The current implementation provides no support for an interactive debugger, although a future version will. Nevertheless, S-Lang has several features that aid the programmer in tracking down problems, including function call tracebacks and the tracing of function calls. However, the biggest debugging aid stems from the fact that the language is interpreted permitting one to easily add debugging statements to the code. To enable debugging information, add the lines
to the top of the source file of the code containing the bug and the
reload the file. Setting the _debug_info variable to
1 causes line number information to be compiled into the
functions when the file is loaded. The _traceback variable
controls whether or not traceback information should be generated.
If it is set to 1, the values of local variables will be
dumped when the traceback is generated. Setting this variable
to -1 will cause only function names to be reported in the
traceback.
Here is an example of a traceback report:
There are several ways to read this report; perhaps the simplest is
to read it from the bottom. This report says that on line 72,
the search_forward function called the
search_generic_search function. On line 65 it called the
verror function, which called error. The
search_generic_search function contains 5 local variables
and are represented symbolically as $0 through $4.
Next Previous Contents |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0171 ]-- |