Debugger
Debug the icon generation process
The Debugger plugin logs information about the icon generation process, helping you understand what's happening during build time.
Usage
import { } from "@monicon/core/plugins";
import { } from "@monicon/core";
export default {
: ["mdi:home", "lucide:heart"],
: [()],
} satisfies ;Options
enabled
Enable or disable the debugger plugin.
- Type:
boolean - Default:
true
import { } from "@monicon/core/plugins";
({ : false });
({ : true });What It Logs
The Debugger plugin logs information at various stages of the generation process:
On Plugins Load
Logs when all plugins are loaded.
[Monicon - Debugger Plugin] On plugins load 3 pluginsBefore Generate
Logs the number of icons about to be generated.
[Monicon - Debugger Plugin] Before generate 2 iconsAfter Generate
Logs the number of icons that were generated.
[Monicon - Debugger Plugin] After generate 2 iconsBefore Write Files
Logs the number of files about to be written to disk.
[Monicon - Debugger Plugin] Before write files 2 filesAfter Write Files
Logs the number of files that were written to disk.
[Monicon - Debugger Plugin] After write files 2 filesExample Output
When running your build with the debugger plugin enabled, you'll see output like:
[Monicon - Debugger Plugin] On plugins load 3 plugins
[Monicon - Debugger Plugin] Before generate 12 icons
[Monicon - Debugger Plugin] After generate 12 icons
[Monicon - Debugger Plugin] Before write files 12 files
[Monicon - Debugger Plugin] After write files 12 filesUse Cases
The Debugger plugin is useful for:
- Development - Understanding what's happening during icon generation
- Debugging - Troubleshooting issues with icon generation
- Performance - Monitoring how many icons and files are being processed
- Verification - Confirming that icons are being generated as expected
Plugin Order
The Debugger plugin can be placed anywhere in the plugins array. It's typically placed last so it logs information about all other plugins:
import { } from "@monicon/core/plugins";
import { } from "@monicon/core";
export default {
: ["mdi:home"],
: [
(), // Last to log all plugin activity
],
} satisfies ;