I found plase of the error, but how I can use some debugger?
Or log to file? Or log to somewhere else?