open-campaign-logger / generator-library

This repository contains the generator library files for https://campaign-logger.com/generator which can be referenced like this: "{lib:adjColor}".
Apache License 2.0
31 stars 13 forks source link

Table debugger tool #25

Open evesala opened 6 years ago

evesala commented 6 years ago

I'm just making a note about an idea in a G+ discussion: https://plus.google.com/+JochenLinnemann/posts/SgtE8kpaRfx

I quote myself:

One option to help with complex table development would be some kind of a debugging tool that would notice calls to non-existing tables and vice versa, and perhaps also output a "table of contents" for the generator as well.

This is of course a bit of a luxury feature and separate from the core Campaign Logger functionality, but would also make an easily outsourced task for a keen developer.

evesala commented 6 years ago

There has been also another mention of this, linking also it here for the sake of completeness:

Debugging tool for the random table generator

This is a non-essential feature suggestion for backburner consideration. There of course are many good tools for JSON syntax checking (I myself am using the free Atom editor with JSON extensions), but sometimes it would be nice to be able to check the sanity of the logic used in complex tables.

Just some simple checks could go a long way:

  • Are there table calls with no corresponding tables found (currently this just prints out the "{table call}" as text and can sometimes be hard to spot).

  • And the opposite could also be helpful: Are there tables that are never called? (Although these can be intentional too, just waiting for the functionality to call subtables from other tables.)

https://plus.google.com/+EVesala/posts/YupFwfq9TFX

JochenLinnemann commented 6 years ago

I added that as an idea for an addon dev to pick up.

evesala commented 6 years ago

Additional ideas from G+ discussion:

I agree that some kind of debug dump would be useful. Ideally with breakpoints, or at least post-run. The dump could include current variable values and the current table+subtable (as well as the previous ones, if possible).

https://plus.google.com/+HannuKokko/posts/DZJ6Tjs4hWr

The sanity checker could also check for empty table entries - they can cause the whole generator output to be empty.

JochenLinnemann commented 6 years ago

I just added more details to the error output on the generator's web site.