diff options
author | Rob Landley <rob@landley.net> | 2015-07-10 14:23:00 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-07-10 14:23:00 -0500 |
commit | 68771c00530622b5bc52438ae8010c7a6f429791 (patch) | |
tree | b7d17c82aba4deee9b8f3858cec9a071d78a8513 /www | |
parent | 1e7b49e25990b6141ffa25da2cd4b6124d435f3d (diff) | |
download | toybox-68771c00530622b5bc52438ae8010c7a6f429791.tar.gz |
More explanation of TOYBOX_DEBUG for option string checking.
Diffstat (limited to 'www')
-rw-r--r-- | www/code.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/www/code.html b/www/code.html index a458b52c..a1c08efe 100644 --- a/www/code.html +++ b/www/code.html @@ -233,6 +233,18 @@ where execution of your command starts. Your command line options are already sorted into this.optflags, this.optargs, this.optc, and the GLOBALS() as appropriate by the time this function is called. (See <a href="#lib_args">get_optflags()</a> for details.)</p></li> + +<li><p>Switch on TOYBOX_DEBUG in menuconfig (toybox global settings menu) +the first time you build and run your new command. If anything is wrong +with your option string, that will give you error messages.</p> + +<p>Otherwise it'll just segfault without +explanation when it falls off the end because it didn't find a matching +end parantheses for a longopt, or you put a nonexistent option in a square +bracket grouping... Since these kind of errors can only be caused by a +developer, not by end users, we don't normally want runtime checks for +them. Once you're happy with your option string, you can switch TOYBOX_DEBUG +back off.</p></li> </ul> <a name="headers" /><h2><a href="#headers">Headers.</a></h2> |