Debug (jEdit API Documentation)
Date: 2017-03-18

org.gjt.sp.jedit

## Class Debug

- java.lang.Object
- - org.gjt.sp.jedit.Debug

-     public class Debug
      extends java.lang.Object

  This class contains various debugging flags (mainly useful for core development) and debugging routines.
  Since:
    jEdit 4.2pre1

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `ALT_KEY_PRESSED_DISABLED` If true, A+ shortcuts are disabled.
    `static boolean` | `ALTERNATIVE_DISPATCHER` Deprecated. no longer used.
    `static boolean` | `BEANSHELL_DEBUG` Logs messages when BeanShell code is evaluated.
    `static boolean` | `CHUNK_CACHE_DEBUG` For checking invalidation, etc.
    `static boolean` | `CHUNK_PAINT_DEBUG` Paints boxes around chunks.
    `static boolean` | `DISABLE_GLYPH_VECTOR` Paint strings instead of glyph vectors.
    `static boolean` | `DISABLE_MULTIHEAD` Disable multihead support, since it can cause window positioning problems with some Java versions.
    `static boolean` | `DISABLE_SEARCH_DIALOG_POOL` Create new search dialogs instead of reusing instances.
    `static boolean` | `DUMP_KEY_EVENTS` Dump key events received by text area?
    `static boolean` | `EB_TIMER` Show time taken for each EBComponent.
    `static boolean` | `FOLD_DEBUG` For checking fold level invalidation, etc.
    `static boolean` | `FOLD_VIS_DEBUG` For checking the line visibility structure..
    `static boolean` | `GEOMETRY_WORKAROUND` Geometry workaround for X11.
    `static boolean` | `INDENT_DEBUG` Indent debug.
    `static boolean` | `OFFSET_DEBUG` Print messages when the gap moves, and other offset manager state changes.
    `static boolean` | `PAINT_TIMER` Show time taken to repaint text area painter.
    `static boolean` | `PRINT_DEBUG` Printing debug.
    `static boolean` | `SCREEN_LINES_DEBUG` Print messages when screen line counts change.
    `static boolean` | `SCROLL_DEBUG` Print messages when text area and display manager perform scroll updates.
    `static boolean` | `SCROLL_TO_DEBUG` Print messages when text area tries to make the caret visible.
    `static boolean` | `SCROLL_VERIFY` Display an error if the scrolling code detects an inconsistency.
    `static boolean` | `TOKEN_MARKER_DEBUG` For checking context, etc.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Debug()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `compDelay(long time)` Does a computational delay.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### OFFSET_DEBUG

          public static boolean OFFSET_DEBUG

      Print messages when the gap moves, and other offset manager state changes.

    - #### SCROLL_DEBUG

          public static boolean SCROLL_DEBUG

      Print messages when text area and display manager perform scroll updates.

    - #### SCROLL_TO_DEBUG

          public static boolean SCROLL_TO_DEBUG

      Print messages when text area tries to make the caret visible.

    - #### SCROLL_VERIFY

          public static boolean SCROLL_VERIFY

      Display an error if the scrolling code detects an inconsistency. This kills performance!

    - #### SCREEN_LINES_DEBUG

          public static boolean SCREEN_LINES_DEBUG

      Print messages when screen line counts change.

    - #### TOKEN_MARKER_DEBUG

          public static boolean TOKEN_MARKER_DEBUG

      For checking context, etc.

    - #### FOLD_DEBUG

          public static boolean FOLD_DEBUG

      For checking fold level invalidation, etc.

    - #### FOLD_VIS_DEBUG

          public static boolean FOLD_VIS_DEBUG

      For checking the line visibility structure..

    - #### CHUNK_CACHE_DEBUG

          public static boolean CHUNK_CACHE_DEBUG

      For checking invalidation, etc.

    - #### CHUNK_PAINT_DEBUG

          public static boolean CHUNK_PAINT_DEBUG

      Paints boxes around chunks.

    - #### PAINT_TIMER

          public static boolean PAINT_TIMER

      Show time taken to repaint text area painter.

    - #### EB_TIMER

          public static boolean EB_TIMER

      Show time taken for each EBComponent.

    - #### DISABLE_GLYPH_VECTOR

          public static boolean DISABLE_GLYPH_VECTOR

      Paint strings instead of glyph vectors.

    - #### BEANSHELL_DEBUG

          public static boolean BEANSHELL_DEBUG

      Logs messages when BeanShell code is evaluated.

    - #### ALTERNATIVE_DISPATCHER

          @Deprecated
          public static boolean ALTERNATIVE_DISPATCHER

      Deprecated. no longer used.

    - #### ALT_KEY_PRESSED_DISABLED

          public static boolean ALT_KEY_PRESSED_DISABLED

      If true, A+ shortcuts are disabled. If you use this, you should also remap the the modifiers so that A+ is actually something else. On by default on MacOS.

    - #### GEOMETRY_WORKAROUND

          public static boolean GEOMETRY_WORKAROUND

      Geometry workaround for X11.

    - #### DUMP_KEY_EVENTS

          public static boolean DUMP_KEY_EVENTS

      Dump key events received by text area?

    - #### INDENT_DEBUG

          public static boolean INDENT_DEBUG

      Indent debug.

    - #### PRINT_DEBUG

          public static boolean PRINT_DEBUG

      Printing debug.

    - #### DISABLE_SEARCH_DIALOG_POOL

          public static boolean DISABLE_SEARCH_DIALOG_POOL

      Create new search dialogs instead of reusing instances. Off by default on Mac OS because it can cause search dialogs to show up on the wrong space.

    - #### DISABLE_MULTIHEAD

          public static boolean DISABLE_MULTIHEAD

      Disable multihead support, since it can cause window positioning problems with some Java versions.
      Since:
        jEdit 4.3pre1

  - ### Constructor Detail

    - #### Debug

          public Debug()

  - ### Method Detail

    - #### compDelay

          public static int compDelay(long time)

      Does a computational delay. Simulates heavy computations for the given period of time. Used to force conditions that are hard to reproduce, for example deadlock cases.
      Parameters:
        `time` - Required delay, in ms
      Returns:
        an integer