2

Can I send http headers when using 'Debug URL' in Zend Studio (eclipse)? I'm debugging an application on a remote server that requires http headers for authentication, json context, etc. I'm able to debug using the Zend Debugger browser extension which I assume uses the auth cookie stored in firefox, but when I try to debug directly through Zend Studio I can't figure out a way to send headers. Am I missing something?

pdizz
  • 4,100
  • 4
  • 28
  • 42

1 Answers1

0

I would use something like XHR Poster for Chrome which would allow you to set headers. You can initiate a debug session by appending the following get query to your URL:

?debug_host=[ZEND_STUDIO_IP_ADDRESS]&debug_port=10137&start_debug=1&original_url=[URL_OF PAGE_UNDER_TEST]&use_remote=1&debug_stop=1

substitute the IP address for the machine Zend Studio is listening on for [ZEND_STUDIO_IP_ADDRESS] and the URL you're testing for [URL_OF PAGE_UNDER_TEST].

Instead of setting the get query you could emulate the Cookies that would otherwise be set by your browser extension by inspecting what cookies are set with Developer Tools and then emulating that header in XHR Poster in addition to whatever other headers you wish to send.

Wes Grant
  • 829
  • 7
  • 13