Skip to main content
Dear ImGui provides several built-in windows for demonstration, debugging, and learning. These are invaluable tools for both learning the library and diagnosing issues in your application.

ShowDemoWindow

Displays the comprehensive Dear ImGui demo window showcasing all features.

Parameters

bool*
default:"NULL"
Optional pointer to a boolean controlling window visibility. When the user clicks the close button, this is set to false.

Description

The demo window is the best way to learn Dear ImGui. It demonstrates:
  • All widget types and their variants
  • Layout and grouping techniques
  • Window management features
  • Input handling examples
  • Tables, trees, and list boxes
  • Drag & drop functionality
  • Multi-selection patterns
  • Custom drawing with ImDrawList
  • Performance optimization tips

Example

With Menu Integration

The demo window source code (imgui_demo.cpp) is extensively commented and serves as a learning resource. Read through it to understand best practices.

ShowMetricsWindow

Displays the metrics/debugger window showing Dear ImGui internals.

Parameters

bool*
default:"NULL"
Optional pointer to a boolean controlling window visibility.

Description

The metrics window provides deep insight into Dear ImGui’s internal state:
  • Active windows and their properties
  • Draw command statistics
  • Vertex and index buffer usage
  • Memory allocations
  • Active ID and hover information
  • Font atlas details
  • Input state monitoring
  • Settings inspection

Example

Debugging Window Issues

Use the metrics window to diagnose performance issues. It shows draw call counts and vertex/index buffer sizes, helping identify rendering bottlenecks.

ShowDebugLogWindow

Displays a simplified log of important Dear ImGui events.

Parameters

bool*
default:"NULL"
Optional pointer to a boolean controlling window visibility.

Description

The debug log window records:
  • Navigation events
  • Focus changes
  • Input capture events
  • Window creation/destruction
  • Table operations
  • Multi-select operations
  • Other significant state changes

Example

Debugging Input Issues

The debug log is particularly useful when debugging keyboard navigation and focus issues.

ShowAboutWindow

Displays the About window with version, credits, and build information.

Parameters

bool*
default:"NULL"
Optional pointer to a boolean controlling window visibility.

Description

The About window displays:
  • Dear ImGui version (e.g., “1.92.7 WIP”)
  • Credits and contributors
  • Build/system information
  • Compiler details
  • Configuration flags
  • Links to documentation and resources

Example

Version Information

Complete Debug UI Example

Keep debug windows disabled in release builds to avoid exposing internal state to end users. Use preprocessor directives:

Best Practices

Learning the Library

Performance Monitoring

Issue Reporting