Skip to content

Debug Mode

Anton edited this page Jun 14, 2017 · 2 revisions

It is not always feasible to know why a a fail-able initializer may have failed to parse a response. USMapperKit provides the ability to use a build-time flag to print out failures to the console.

To enable Debug mode, add the -DJMMAPPER_DEBUG flag to the Other Swift Flags in your build settings.


![alt tag](/documentation/readme_assets/debug_flag.png?raw=true)

The resulting output in the console will resemble the following:

Business instance could not be parsed, missing values for the following non-optional properties:
- business_uuid

Response:
[response: {
    "business_name"	: "NYC Restaurant",
    "business_ratings"	: [ 5, 4, 5, 4 ],
    "business_open"	: 1
}]