Skip to content

Categories:

Connecting Zend Studio to Zend Debugger over an SSH Tunnel

This article applies to:

[ Zend Studio, Zend Server ]
[ All operating systems ]

Overview


Normally, Zend Studio initiates the remote debugging session by sending a regular HTTP request to the debug server. This HTTP request contains return address parameters (IP address and port number) that the Zend Debugger uses when starting a new connection to Zend Studio in order to relay debugging information.

Regular debug session

regular_debugging

In many environments, it may be the case that the debugging session is prevented by some network obstacles (firewalls, routers, proxy servers, etc.). To allow safe and effective bypassing of network obstructions you can setup an SSH Tunnel for remote debugging with Zend Studio. In this case, the process of establishing the debug session consists of two major steps:

  • Creating an SSH Tunnel
  • Instructing Zend Debugger to relay its traffic through the SSH Tunnel

To setup an SSH Tunnel you need first to tell the SSH daemon to open a listening port on the server and forward the traffic from this port to the port on your workstation, where Zend Studio is listening. Once this is done you need to instruct Zend Debugger to send the debug information not to the Zend Studio workstation directly, but through the created tunnel.

Debug session trough the SSH Tunnel

debugging_through_tunnel

Note

Since Zend Studio opens the listening port 10137 for establishing the debug sessions by default, we use this port number in our examples. If for some reason you are using a different port, make the necessary changes to adapt our instructions to your situation.

Instructions

Creating an SSH Tunnel

To create an SSH Tunnel from a Linux and Mac OS X workstation use this command template:

ssh :127.0.0.1: @

For example:

user@workstation:~> ssh -R 10137:127.0.0.1:10137 user@debugserver
user@debugserver’s password: 

Welcome to the Debug Server!
user@debugserver:~$

To create an SSH Tunnel from a Microsoft Windows workstation, you can use PuTTY. Run the program and configure it as described below:

    1. From the Category list choose Connection

      Read more : Connecting Zend Studio to Zend Debugger over an SSH Tunnel

Posted in Uncategorized.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.