[xdebug-general] Re: Windows CLI Debugging with Netbeans

From: Nathan Bruer <thegreatall[@]gmail.com>
Date: Thu, 12 Aug 2010 08:58:51 -0600

I have xDebug and netbeans working great together, usually the default
settings that netbeans has works, the problem i think your having is maybe
you are not using the syntax client correctly.

make sure your php file is running on the same machine your netbeans is on
(because you are using localhost), and when you open a file, make a
breakpoint, then click the debug button, not run. If you launch the debug
correctly and no connections get established to netbeans from xdebug, it
will tell you when you stop debugging that no xdebug connections where
established, if that is the case then you have a config problem between
xdebug and netbeans.

(sorry for sending you two derick, gmail can be annoying sometimes)

On Thu, Aug 12, 2010 at 4:32 AM, Ben Waine <ben[@]ben-waine.co.uk> wrote:

> Hello,
>
> I hope someone can help, I'm having some difficulty using remote debugging
> with netbeans on the windows 7 (professional) CLI.
>
> I'll outline the process I have gone through thus far:
> *
> 1) Set up php.ini:*
>
> xdebug.remote_enable=On;
> xdebug.remote_host=localhost;
> xdebug.remote_port=9000;
> xdebug.remote_handler="dbgp";
> xdebug.remote_mode=req;
>
> *2) Do php -v to ensure the extention is installed correctly:*
>
> PHP 5.3.1 (cli) (built: Nov 19 2009 09:59:45)
> Copyright (c) 1997-2009 The PHP Group
> Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
> with Xdebug v2.1.0rc1, Copyright (c) 2002-2010, by Derick Rethans
> *
> 3) Add configuration in netbeans:*
>
> tools > options > general > debugging
>
> Debugger port: 9000
> Session ID: netbeans-xdebug
>
> *4) Create a simple php script:*
>
> <?php
>
> $var = 1;
>
> $var = 2;
>
> $var = 3;
>
> $var = 4;
>
> $var = 5;
>
> echo $var;
>
> ?>
>
> *5) Right click on the file in netbeans and click 'debug':*
> *
> (NOTE: added a breakpoint to line 1)
>
> 'Waiting For Connection (netbeans-xdebug') *appears in the bottom right
> corner of netbeans
>
> *6) In the CLI set environment variable*:
>
> At this step i have tried both:
>
> set XDEBUG_CONFIG="idekey <http://docs/all_settings#idekey>
> =netbeans-xdebug"
>
> and
>
> set XDEBUG_CONFIG=idekey <http://../../docs/all_settings#idekey>
> =netbeans-xdebug"
>
> *7) Execute PHP script: *
>
> php xdebugtest.php
>
> output: 5
>
> I'm at a bit of a loss. I cant seem to get netbeans to establish a
> connection with the command line and hit the first break point.
> Are there any obvious mistakes I have made?
>
> Thanks in advance for any assistance!
>
> Regards,
>
> Ben
>
>
Received on Thu Aug 12 2010 - 15:58:52 BST

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