Share this page

# lr.debugMessage

Sends a debug message to the log file.

Example | Message Functions

## Syntax

    lr.debugMessage( message_level, message );

## Arguments

Argument | Comments
--- | ---
message_level | One of the Message Log Runtime Settings. Disabled does not apply.
message | The message to be sent to the log file.

The lr.debugMessage function sends a debug message when the specified message level is active. If the specified message level is not active, a message is not issued. You can set the active message level to MSG_CLASS_BRIEF_LOG or MSG_CLASS_EXTENDED_LOG from the user interface or by using lr.setDebugMessage. To determine the current level, use lr.getDebugMessage.

Note that you can also specify multiple message levels with an OR separator ("|"). If any one of the levels are active, the message is issued to the Output window.

The message is sent to the output window. To display the debug messages in the output window, use the Expert mode Settings. Activate Expert mode (Tools > Expert mode) and then choose Tools > Options > Debug Information and select the General check box.

lr.setDebugMessage calls can affect the output.

## Return Values

Returns the number of characters written, not including the terminating null-character if any. On error, returns a negative number.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

See Also

## Example

    function Action(){
       var rc = 2001;
       lr.setDebugMessage(lr.MSG_CLASS_EXTENDED_LOG, lr.SWITCH_ON);

       if (rc > 2000)

           lr.debugMessage(lr.MSG_CLASS_RESULT_DATA | lr.MSG_CLASS_PARAMETERS, "Operation failed.");
       return 0;
    }

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: