Debugging JSON connections
For the majority of its integrations (JIRA, GitHub, Bitbucket, GitLab, …), the corresponding platform will be accessed over a REST API which is based on JSON. In case of parsing problems, it may be helpful to debug log sent and received JSON objects. To do so:
-
create a temporary debug output directory on your hard disk, which is writable for SmartGit (e.g.
c:/temp/json
) -
add following line to smartgit.properties for which you will replace
<absolute-path-to-debug-directory>
by your directory’s path (on Windows, be sure to use forward-slashes instead of back-slashes)smartgit.json.debugDir=<absolute-path-to-debug-directory>
Example:
smartgit.json.debugDir=c:/temp/json
-
restart SmartGit to have the changes take effect
- invoke the problematic operation:
- in case of parsing problems, SmartGit will report the debug output file for the failed operation in the error message
- check the debug output directory for sent and received JSON objects:
- there will be one
in
file containing the received content, an optionalout
file containing the sent content and an optionalerr
file containing the received error - all files belonging to the same request will be labeled by a unique timestamp
- there will be one