[xdebug-general] Re: Tricky Remote Debugging Set Up

From: Ben Waine <ben[@]ben-waine.co.uk>
Date: Mon, 18 Jul 2011 12:04:22 +0100

Hello,

I sent this email half complete a few minutes ago. Apologies!

I am trying to set up the ability to debug command line scripts on a guest
VM in an IDE running on the Host machine.

Here are my settings:

zend_extension = /usr/lib64/php/modules/xdebug.
so
xdebug.var_display_max_depth=7
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=192.168.56.1
xdebug.remote_port=9000
html_errors = 1;

I then exported the XDEBUG_CONFIG environment variable as outlined in the
docs:

export XDEBUG_CONFIG="idekey=netbeans-xdebug"

I then run a php script:

php test.php

At this point execution hangs on the guest VM.

On the host machine I have tried the following two things:

1) Start a Netbeans debugging session (right clicking on the project, debug)
    - The PHP script hangs on the guest machine

2) After quiting Netbeans I tried using the bundled debugging client.

I got the following response when restart the php script:

waineb[@]waineb-HP-Z200-Workstation:~/xdebug/xdebug-2.1.1RC1/debugclient$ sudo
debugclient
Xdebug Simple DBGp client (0.10.0)
Copyright 2002-2007 by Derick Rethans.
- libedit support: enabled

Waiting for debug server to connect.
Connect
<?xml version="1.0" encoding="iso-8859-1"?>
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="
http://xdebug.org/dbgp/xdebug" fileuri="file:///usr/bin/behat"
language="PHP" protocol_version="1.0" appid="5070"
idekey="netbeans-xdebug"><engine
version="2.1.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick
Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright
(c) 2002-2011 by Derick Rethans]]></copyright></init>

This seems to indicate that the xdebug has connected to the client. However
when I issue commands like 'run' or 'status' I get the following error:

(cmd) status
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="
http://xdebug.org/dbgp/xdebug" command="status"><error
code="3"><message><![CDATA[invalid or missing
options]]></message></error></response>

Has anyone got any tips on what might be happening here?

Thanks,

Ben
Received on Mon Jul 18 2011 - 12:04:24 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST