Skip to main content
Skip table of contents

LJM Debugging Functions

LJM contains debug logging functionality that is disabled by default.

Once enabled, LJM will write messages to the LJM debug log file. These messages can contain error messages, warnings, raw packets, and other information.

LJM's debug logging can be enabled using one of two methods – via ljm_startup_configs.json or via LJM_WriteLibraryConfigS. Both methods (described below) require changing the following LJM configuration parameters:

  • Change LJM_DEBUG_LOG_MODE to LJM_DEBUG_LOG_MODE_CONTINUOUS (equal to 2).

  • Change LJM_DEBUG_LOG_LEVEL to one of the possible debug levels. Use LJM_STREAM_PACKET (equal to 1) if you want to ensure that all debug messages are output.

  • Change LJM_DEBUG_LOG_FILE_MAX_SIZE to a large number like 123456789 if your program will be running for a long time.

Debug Log Functions

Enabling debug logging via ljm_startup_configs.json

The file ljm_startup_configs.json contains the LJM configurations that are used by LJM when LJM is loaded.

Note that ljm_startup_configs.json is installed / replaced every time the LJM installer is run, so this method is temporary. LJM installs ljm_startup_configs.json to the following locations:

  • Windows Vista and later - C:\ProgramData\LabJack\LJM\ljm_startup_configs.json

  • Windows XP (deprecated) - C:\Documents and Settings\All Users\Application Data\LabJack\LJM\ljm_startup_configs.json

  • Mac OS X and Linux - /usr/local/share/LabJack/LJM/ljm_startup_configs.json

After opening ljm_startup_configs.json with a text editor, change the parameters as described above.

Enabling debug logging via LJM_WriteLibraryConfigS

Use the function LJM_WriteLibraryConfigS to change the LJM parameters as described above.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.