Make the debug data a bit more usable

This commit is contained in:
Oliver-Akins 2023-12-23 19:31:12 -07:00
parent d381c3f890
commit da7e475a4e
2 changed files with 8 additions and 5 deletions

View file

@ -11,7 +11,7 @@ export async function registerHandlebarsHelpers() {
"dotdungeon-array": createArray,
"dotdungeon-toFriendlyDuration": toFriendlyDuration,
"dotdungeon-objectValue": objectValue,
"dotdungeon-stringify": JSON.stringify,
"dotdungeon-stringify": v => JSON.stringify(v, null, ` `),
});
};

View file

@ -211,17 +211,20 @@
{{/ dotdungeon.panel}}
{{#if settings.devMode}}
<div class="debug-data">
<div class="debug-data" style="grid-column: 1 / span 3">
<div>
{{dotdungeon-stringify settings}}
Settings:
<pre><code>{{dotdungeon-stringify settings}}</code></pre>
</div>
<hr>
<div>
{{dotdungeon-stringify system}}
System:
<pre><code>{{dotdungeon-stringify system}}</code></pre>
</div>
<hr>
<div>
{{dotdungeon-stringify actor}}
Actor:
<pre><code>{{dotdungeon-stringify actor}}</code></pre>
</div>
</div>
{{/if}}