LCM debug options

The following describes how to activate specific debug variables for various mechanisms. Useful for developers, testers and translators.

Activating general debug messages

The "log/lcm.log" file prints a few informative messages for each request made to the webserver (which are triggered by the lcm_log() function), but it is possible to make it even more verbose by activating the global debug option, which is triggered by the use of the lcm_debug() function).

To activate:

  1. Edit or create the my_options.php file.
  2. Add the following code:

Make sure that there are no spaces before and after the "php" tags or you will get an error that "the headers have already been sent".

Activating PHP debug messages

Similar procedure to the above (general debug messages), but with the following code:

You can (and probably should) combine the two debug options:

Note that this can generate quite alot of information.

Activating string highlighting for translation debug

Strings of the user-interface go through a translation system. Often, new features of LCM have the strings hardcoded in the code itself until the feature is stabilised, so that it is then sent to the translators.

For translators, there are two options to help with translation:

  1. Show all translated strings in red (useful to know whether a given string is in the translation system or now)
  2. Show the "key" of the translation strings, instead of translating the strings. For example, the key of the "Register new case" button in the "list of cases" is "case_button_new". You can then search this key in the "inc/lang/lcm_(xx).php" file, where "xx" is the language code (en, bg, fr, etc.).

There are two ways to activate the above options:

  1. In the URL of the page you are accessing, you can add "?debug_tr=1" to print the translated text in red and "?debug=2" to print the translation keys. Note: if there is already a "?something=..", you must add "&debug=1" or "&debug=2" instead.
  2. In the "my_options.php" file (see above section "Activating general debug messages"), you can add the following code:

Note: the debug_tr=2 option is available from LCM 0.6.4a.

To send a message Private area Registering with the site xml ?