Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #6780

Re: PHP Debugger which can set breakpoint and view variables on watch window

From "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Newsgroups comp.lang.php
Subject Re: PHP Debugger which can set breakpoint and view variables on watch window
Date 2012-08-13 10:00 +0200
Organization http://alvaro.es/
Message-ID <k0ac6p$4m8$1@dont-email.me> (permalink)
References <d215b5e4-d65a-4ace-89f9-c65c0db83672@googlegroups.com>

Show all headers | View raw


El 10/08/2012 10:14, Lightee escribió/wrote:
> I just started reading up on PHP a few weeks ago. Borrowed a number
> of books but none of them could recommend a debugger which can set
> breakpoint and view variables on watch window. Is it possible to have
> a debugger like Visual Studio where one can step through the code,
> view how the variables change in a watch window? This is essential
> for good quality code and debugging.
>
> Not sure if this is a limitation of PHP or I am ignorant. Does such a
> debugger exist?

Such debugger exists, but it isn't part of the language itself. It's 
composed of two parts:

1. A server-side library you plug into your PHP installation
2. A client-side tool to interact with the first component

... and there are several alternatives to choose for.

For #1, the most common option is Xdebug, probably because it's the only 
decent free tool out there (all other tools I know are proprietary and 
cost money). It's reasonably good, but you must be sure you follow the 
official documentation if you want to configure it: docs you find out 
there tend to be pretty outdated.

For #2, you need a tool that's compatible with your first choice. As far 
as I know, most IDEs (but not all) support Xdebug: NetBeans IDE, 
Exclipse, PhpStorm, Komodo IDE...

Some IDEs force you to use their own Apache+PHP+Xdebug bundle, which can 
make things more difficult to understand.

Additionally, there're browser extensions for Firefox, Chrome, Opera... 
that simplify enabling and disabling debugging.


-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

PHP Debugger which can set breakpoint and view variables on watch window Lightee <lightaiyee@gmail.com> - 2012-08-10 01:14 -0700
  Re: PHP Debugger which can set breakpoint and view variables on watch window Jerry Stuckle <jstucklex@attglobal.net> - 2012-08-10 07:58 -0400
    Re: PHP Debugger which can set breakpoint and view variables on watch window Ross McKay <au.org.zeta.at.rosko@invalid.invalid> - 2012-08-11 08:38 +1000
  Re: PHP Debugger which can set breakpoint and view variables on watch window Michael Vilain <vilain@NOspamcop.net> - 2012-08-10 05:50 -0700
  Re: PHP Debugger which can set breakpoint and view variables on watch window Ross McKay <au.org.zeta.at.rosko@invalid.invalid> - 2012-08-11 08:47 +1000
  Re: PHP Debugger which can set breakpoint and view variables on watch window "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-08-13 10:00 +0200

csiph-web