
$ [sudo] npm install @melonjs/debug-plugin
Then import and instantiate the debug plugin in your project. For example:
import { utils, plugin } from 'melonjs';
// dynamically import the plugin
import("@melonjs/debug-plugin").then((debugPlugin) => {
// automatically register the debug panel
utils.function.defer(plugin.register, this, debugPlugin.DebugPanelPlugin, "debugPanel");
});
The Debug Panel is hidden by default and can be displayed using the S key. It provides a compact HUD overlay with real-time engine diagnostics:

The panel displays the following information across three rows:
performance.now() is clamped to 100µs in a page that is not cross-origin isolated, so a single frame's reading cannot resolve the printed decimals)Below the stats, two sparkline graphs show:
Note: Heap memory information is only available in Chromium-based browsers (Chrome, Edge, Opera) via the
performance.memoryAPI, which is deprecated but has no real-time alternative yet.
Additionally, using the checkboxes in the panel it is also possible to draw:
If you need technical support, you can contact us through the following channels :