Debugging - SGE Documentation

## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Debugging

SGE comes with a set of tools for measuring performance and resource usage, useful for checking for any inefficiencies or memory leaks.

There are functions for checking performance directly.

- `avg_fps`
- `max_fps`
- `min_fps`
- `get_draw_calls`
- `get_drawn_objects`
- `get_engine_time`
- `get_index_count`
- `get_max_draw_calls`
- `get_max_drawn_objects`
- `get_max_engine_time`
- `get_max_index_count`
- `get_max_vertex_count`
- `get_vertex_count`

See: debugging module

There are also some built-in debug visualisations such as drawing a window, using the engine’s built-in UI library, that shows graphs of the number of vertices/indices drawn and lots of other information.

Use `draw_debug_info` for graphs, or `draw_simple_debug_info` for just numbers (better performance).

See: debug visualisations module