<p>I'm using <a href="http://www.zend.com/en/products/studio/" rel="nofollow noreferrer">Zend Studio</a> to do remote debugging of my php scripts on a dev server. It works great for web code, but can I make it work with command line scripts?</p>

<p>I have several helper apps to make my application run. It would be really useful to fire up the remote debugger through command line instead of a web browser so I can test these out. </p>

<p>I assume it's possible, since I think Zend is using xdebug to talk to Eclipse. Apparently, it adds some parameters to the request to wake the Zend code up on a request. I'm guessing I'd need to tap into that?</p>

<p><em>UPDATE</em></p>

<p>I ended up using xdebug with <a href="http://protoeditor.sourceforge.net/" rel="nofollow noreferrer">protoeditor</a> over X to do my debugging.</p>

[{'answer_id': 26415, 'author': 'Till', 'author_id': 2859, 'author_profile': 'https://Stackoverflow.com/users/2859', 'pm_score': 1, 'selected': False, 'text': '<p>Since this is more along the lines of product support, your best bet is probably emailing the support people. We bought Zend Studio at my last job and they were always able to help us in a matter of hours.</p>\n\n<p>Feel free to post the answer though, I am sure there are more people looking for it. :)</p>\n'}, {'answer_id': 26431, 'author': 'Brendon-Van-Heyzen', 'author_id': 1425, 'author_profile': 'https://Stackoverflow.com/users/1425', 'pm_score': 1, 'selected': False, 'text': "<p>There's an option to debug a php script,\nrun->run as->php script</p>\n\n<p>I believe it also has to be in your project root though. Just for clarification, Zend studio uses their own debugger, while the eclipse pdt project you have the option for Xdebug or Zend's debugger.</p>\n"}, {'answer_id': 340769, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': True, 'text': '<p>I was able to get <a href="http://thenazg.blogspot.com/2008/12/remote-cli-debugging-via-eclipse-pdt.html" rel="nofollow noreferrer">remote CLI debugging working in Eclipse</a>, using xdebug, though I\'ve not tried it with the zend debugger.  I would assume this should work the same with ZSfE, if that\'s the "Zend Studio" you\'re using.</p>\n'}, {'answer_id': 3091577, 'author': 'Ramon Poca', 'author_id': 117188, 'author_profile': 'https://Stackoverflow.com/users/117188', 'pm_score': 0, 'selected': False, 'text': '<p>Haven\'t tried, but you can set the QUERY_STRING environment variable to the one that toggles the Zend debugger on.</p>\n\n<p>Per <a href="http://greg.chiaraquartet.net/archives/16-Incredible-Zend-ZDE-debugging-trick-for-debugging-CLI-apps.html" rel="nofollow noreferrer">this article</a>.</p>\n\n<pre><code>export QUERY_STRING=start_debug=1&amp;debug_host=&lt;host name or IP of the local machine&gt;&amp;debug_port=&lt;the port that is configured in your ZDE settings&gt;&amp;debug_stop=1\n</code></pre>\n\n<p>And then run the CLI script.</p>\n'}, {'answer_id': 4786171, 'author': 'amateur barista', 'author_id': 467453, 'author_profile': 'https://Stackoverflow.com/users/467453', 'pm_score': 0, 'selected': False, 'text': '<p>Remote command-line debugging is possible, I just tried it.\nIn my case I used Zend Studio + Zend Debugger.</p>\n\n<p>This official article <a href="http://kb.zend.com/index.php?View=entry&amp;EntryID=130" rel="nofollow">here</a> by the <strong>Zend</strong> people will help you out, it\'s what I used. It explains all the parameters that must go into the shell command.</p>\n\n<p>Make sure that you have the <em>php.ini</em> properly set on the remote server, and that it allows your IP address and it will work.</p>\n\n<p>Also, you don\'t need to export the <code>QUERY_STRING</code> variable.</p>\n\n<p>You can just do:</p>\n\n<blockquote>\n  <p>QUERY_STRING="start_debug=1&amp;debug_host=[127.0.0.1]&amp;no_remote=0&amp;debug_port=10137&amp;debug_stop=0" /path/to/php/binary /your/php/script.php</p>\n</blockquote>\n\n<p>Running that on an SSH shell will light up your Zend Studio. Sweet!</p>\n'}]
['https://Stackoverflow.com/questions/25252', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2506/']