Debugging using Zend Debugger in PhpStorm 2.0

Greetings. I have a problem using Zend Debugger.
The IDE installed at windows machine, my php project is on remote server and has access via samba. Zend Debugger is properly installed and running at remote server.

First off all I've edit Run/Debug configurations. Created new PHP Remote Debug node, configured server host, port set to 80 (by default) and choosed Zend Debuger from Debugger combobox.
Ide key (session id) set to "506" - what is it? Is it just my random session id? Anyway I have tried to set it to random values, because it is a mandatory field.

Next I've put break point into my index.php file and tried to run Debug. Debug window appears with the only message "Waiting for incoming connection with session id '506'". And that's it.

What am I doing wrong? Where are my mistakes? Is there another way to use Zend Debugger?
Thank in advance



Attachment(s):
debug_window.png
run_debug_configuration.png
2 comments
Comment actions Permalink

Hello Vitaly,

First off all I've edit Run/Debug configurations. Created new PHP Remote Debug node, configured server host, port set to 80 (by default) and choosed Zend Debuger from Debugger combobox.

You set incorrect hostname value - it should be just 'my_sever.info'.

Next I've put break point into my index.php file and tried to run Debug. Debug window appears with the only message "Waiting for incoming connection with session id '506'". And that's it.

Php debugger(XDebug or Zend Debugger) works on server side, so PhpStorm can just wait for incomming connections. After turning PhpStorm into listening state, you need to trigger debugger on server side.

There are several ways to debug scripts on server in PhpStorm:

  1. 'PHP Web Application' run configuration.
    php_web_application.png
    PhpStorm will open specified url in browser and append special get parameters which trigger debug session.

  2. 'Listen PHP debug connections' button
    listen_for_incoming_connections.png
    We recommend to use this way for debugging web pages. But you need any triggerer for server side. Breifly: you need to set special cookies which will say to Zend Debugger that it should connect to IDE. For that we recommend to use our bookmarklets which works in any browser: http://www.jetbrains.com/phpstorm/marklets/
    bookmarklets.png
  3. 'PHP Remote Debug' run configuration
    This run configuraion works for Zend Debugger, but the primary usage of it is XDebug.(usually using Zend Debugger you haven't control on session id).


I hope that this getting started will help you. Looking forward for questions/feedback from you.

Thank you!

0
Comment actions Permalink

Thanks. This information helped me

0

Please sign in to leave a comment.