League-of-Foundry-Developers / foundryvtt-devMode

A module with some tools to help enable Foundry VTT package developers.
MIT License
12 stars 15 forks source link

Add "onchange" callback for debug level. #34

Open zeel01 opened 2 years ago

zeel01 commented 2 years ago

Is your feature request related to a problem? Please describe. When the debug level changes, there isn't a way to "respond" to that change. For instance, if I want a custom application to have a "log to console" button on itself, I can't refresh the application when the log level changes.

Describe the solution you'd like Add an onchange callback that can be registered.

Additional context I added buttons in Monarch to log a card to the console from the hand/deck since Dev Mode can only do this for the containers not the cards themselves. But if I change the setting, I have to manually re-render the sheets to add/remove the buttons.