Skip to content

(Chihiro) Debugging PSDLE

RePod edited this page Nov 19, 2017 · 1 revision

Debug options are only visually available while selecting startup options. Stability when used elsewhere is not guaranteed.

Most debugging tools are located at repod.psdle.debug{}, however most functions outside of this accept an index of repod.psdle.gamelist[].

Dying

repod.psdle.debug.die()

Very crude way of cleaning up, doesn't do a whole lot and doesn't do it well.
PSDLE was never intended to "clean up" or be used multiple times in one session.

Entitlement

repod.psdle.debug.entitlement(input,type)

Searches for entitlement(s) data matching input.
If type is "name" or empty (default), attempts to find names containing the search.
If type is "id", attempts to find unique IDs containing the search.

Logs various useful information, including the entire entitlement data (with certain obfuscations).

Inject Entitlement

repod.psdle.debug.injectEntitlement(entitlement)

Accepts or prompts for a JSON (string or pre-existing object) object then caches it for list generation. When list generation starts, the user's original and injected entitlements are combined before processing.
Useful for injecting sample data (exported from the function above) to mimic scenarios.

Returns amount of injected entitlements.

Language Injection

repod.psdle.debug.inject_lang()

This method displays a prompt requesting a JSON formatted string.
If valid, overwrites a copy of the English language template.

Fake List Generation

repod.psdle.debug.fake_list()

Generates a fake list based on the current page view. If it cannot find the required content on the page, it will fail.
At the time of writing this does not completely emulate repod.psdle.generateList(), which uses Entitlement data.
Generally any page containing game panels (including the icon, title, system, cost, etc) that link to the actual product pages will work.

Check Catalog Parsing

repod.psdle.debug.checkParse(pid)

Fetches the Catalog data of provided pid and returns the expected processed result.

Difference

repod.psdle.debug.difference(regen)

Compares gamelist and gamelist_cur for missing entries then overwrites gamelist_cur with them.
If regen is true, force the table to regenerate.

Find Bad

repod.psdle.debug.findBad()

General sanity checks of repod.psdle.gamelist of fatally missing properties.
Returns an array of their indexes.

Make Bad

repod.psdle.debug.makeBad()

Complimentary to above.
Randomly deletes properties in repod.psdle.gamelist entries that would be fatal to PSDLE's execution.