Resource debugging


I wrote a resource in go. I’ve tested it locally with what I think should be the input (stdin and args) and it works as expected. When I try to use it as a resource from a pipeline, I get a strange error:

invalid character ‘I’ looking for beginning of value

As i found out this is probably a bug in my code regarding json decoding. And this is where my problems starts: I cannot find out what I got as input. I’ve checked Concourse logs (web and workers) but all I can see is the error I got.

Is there a way to “debug” somehow the resource?

Doing fmt.Println from my code outputs nothing at all. Intercepting with fly gets me to the container, but I found nothing regarding this error there.


Okay, as I assumed, it was a bug in my code: The resource (out) did some trace output to stdout. It is now resolved, although I would suggest some better error message there, something like: “The resource sent response data to stdout in a wrong format.”, - or something alike.