kazy kazy - 1 year ago 51
PHP Question

Is there any option in Drive SDK for debugging?

I am having troubles with my PHP application which uses Drive SDK. I am trying to update a file, but all the time I receive

500 Internal Error
message when I try to update file's contents.

I am looking for some way to debug the application. What would be most helpful for me is possibility to view how the entire request along with all headers look like. Is there any way to check it, or are there any other options for debugging?

Thank you a lot for your time.

Answer Source

I still didn't find any option for debugging- However, I found how I can view the requests done by the API client.

Open google-api-php-client/io/Google_REST.php file and find static public function execute(Google_HttpRequest $req) function.

There you will find this line: $httpRequest = Google_Client::$io->makeRequest($req);

Right under it put the following code: var_dump($httpRequest);

During every request the client will do, you will get dump of it's request.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download