Gambas Documentation - /lang/debug

# DEBUG

DEBUG Expression [ { ; | ;; | , } Expression ... ] [ { ; | ;; | , } ]

Prints expressions to the standard error output, only if your program is compiled with debugging informations.

The location of the DEBUG line code is printed before anything else.

The expressions are converted to strings by the Str$ function.

- If there is no semi-colon nor comma after the last expression, a newline character is printed after the last expression.

- If the semi-colon is doubled, then a space character is printed between the expressions.

- If a comma is used instead of a semi-colon, then a tab character (ASCII code 9) is printed to separate the expressions.

### Example

    PUBLIC SUB Form_Open()
    DIM a AS Float

    a = 45 / 180 * Pi
    DEBUG "at 45 degrees the sine value is ", Format$(a, "0.####")
    END

will print in the console tab of the IDE :

    FMain.Form_Open.11: at 45 degrees the sine value is     0.7854

### See also

- Error Management

- PRINT