之前在Zend Studio 9中使用Zend Debugger进行远程调试时遇到一些问题,在Google时,
找到了下面这篇文章,是对SSH Tunnel连接Zend Debugger的介绍,很有用处.在此转贴.
Connecting Zend Studio to Zend Debugger over an SSH Tunnel
This article applies to:
[ Zend Studio 7.x, Zend Studio for Eclipse 6.x ]
[ 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
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
Instructions
Creating an SSH Tunnel
To create an SSH Tunnel from a Linux and Mac OS X workstation use this command template:
ssh <Zend Studio listening port>:127.0.0.1:<port to open on the debug server> <user>@<debug server address>
For example:
user@debugserver's password: <enter user's password on 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:
-
From the Category list choose Connection | SSH | Tunnels.
This will display the Options controlling SSH port forwarding page. - In the Source port field enter "10137".
- In the Destination field enter "127.0.0.1:10137".
- From the options below select Remote.
-
Click Add.
This will add the configuration to the Forwarde ports list.
-
From the Category list choose Session.
This will display the Basic options for your PuTTY session page. - In the Host Name field enter the name or the IP address of the debug server (you may use the "user@host" notation as well).
- In the Saved Sessions field enter a descriptive name.
-
Click Save.
This will add the newly configured session to the Saved Sessions list where you can easily re-use it.
- Click Open to create the SSH Tunnel connection to the debug server.
- Enter the user name and password at relevant prompts.
Using keyboard-interactive authentication.
Password: <enter user's password on the debug server>
user@debugserver:~$
Instructing Zend Debugger to Relay Its Traffic Through the SSH Tunnel
-
In Zend Studio go to Window | Preferences.
This opens the Preferences page. - Navigate to the page PHP | Debug | Installed Debuggers.
-
Select Zend Debugger and click Configure.
This opens the Zend Debugger configuration dialog. - Verify that the field Client Host/IP contains the loopback address 127.0.0.1.
Result
You should be able to verify that the SSH Tunnel is open in the remote shell session after the connection. Issue the following command to see that the SSH deamon is listening on the local port 10137:
tcp 0 0 127.0.0.1:10137 0.0.0.0:* LISTEN
tcp6 0 0 ::1:10137 :::* LISTEN
The ultimate proof that your setup is correct is the possibility to start and conduct a remote debugging session.
相关推荐
Connecting the Atmel ARM-based Serial Synchronous Controller (SSC) to an I2S-compatible Serial Bus
How to Connecting HTML Help to C++/MFC Programs
Mobile Tutorial_ Connecting to an Enterprise Database from a Mobile Client (iOS and Android) - RAD Studio.pdf
1. Introduction to Zend Framework 1.1. 概述 1.2. 安装 2. Zend_Acl 2.1. 简介 2.1.1. 关于资源(Resource) 2.1.2. 关于角色(Role) 2.1.3. 创建访问控制列表(ACL) 2.1.4. 注册角色(Role) 2.1.5. 定义访问...
ssh2 一些错误问题的记录
For more information, see Connecting to an ESX host using an SSH client (1019852). 2.Take a backup of the /etc/vmware/config file using this command: cp /etc/vmware/config /var/tmp/ 3. Edit the /...
ganymed-ssh2-build ssh2 ch.ethz.ssh2.Connection ch.ethz.ssh2.SCPClient
Connecting Xcelsius Dashboards to External Data Sources using Excel 2003
windows系统下最好用的SSH服务器软件
1、查看SSH客户端版本 有的时候需要确认一下SSH客户端及其相应的版本号。使用ssh -V命令可以得到版本号。需要注意的是,Linux一般自带的是OpenSSH: 下面的例子即表明该系统正在使用OpenSSH: $ ssh -V OpenSSH_...
OPC:Error connecting to opc 2.0 server browser 没有注册类别 问题解决
studio3T mongodb可视化工具,对nosql的可视化操作,nosql查询等
Ganymed SSH-2 for Java是用纯Java实现SSH-2协议的一个包。可以利用它直接在Java程序中连接SSH服务器。Ganymed SSH-2支持SSH对话(远程命令执行和shell访问),本地和远程端口转发,本地数据流转发,X11转发和SCP。这些...
Connecting to 222.73.218.96:22... Connection established. To escape to local shell, press 'Ctrl+Alt+]'. Last login: Tue Oct 30 17:09:29 2012 from 114.221.117.202 [root@S2-PC ~]# ifconfig eth0 Link ...
藏经阁-Scaling Spark applications by connecting code to resource co
it is very good tool for connecting to UNIX to execute code or upload or download file.
解决license无法启动问题 1、检查安装的license是否是crack下的可破解版 2、检查service.TXT是否已替换,用户名是否已更改、文件是否完整.....
RAD Studio 10.3 Rio is supported Support of UPPER and LOWER functions for Unified SQL is added Bug with using the FieldOrigins property is fixed Bug with using the TrimFixedChar property is fixed Bug ...