News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Debugging with Xdebug and Sublime Text 3
February 28, 2014 @ 11:10:53

The latest post from the SitePoint PHP blog, a new tutorial by Peter Nijssen, shows you how to get started with Xdebug and Sublime Text 3 to debug your PHP applications.

Debugging - we all do it a lot. Writing code perfectly the first time around is hard and only a few (if any) succeed at it. More than a year ago, Shameer wrote an article on SitePoint about how you can debug your application using Xdebug and Netbeans. In this article, we are going to have a look at how we can debug using Xdebug in combination with Sublime Text.

He assumes you already have Xdebug installed (and links to the instructions for those that don't) and helps you configure it to find your listening editor. Back in Sublime, he shows you how to use the package manager to install the Xdebug client and configure the current project to use it. He shows how to set up breakpoints and view the stack/watch data when the point is hit.

0 comments voice your opinion now!
debug xdebug sublimetext remote tutorial package client

Link: http://www.sitepoint.com/debugging-xdebug-sublime-text-3/

Dutch Web Alliance:
The definitive remote debug and unittest with PHPStorm guide part 6
January 09, 2014 @ 11:20:28

The Dutch Web Alliance has posted the sixth part of their series helping you debug/unit test your applications with PHPStorm and Xdebug. In this new post they focus on working with command-line applications.

So there is already a lot covered: debugging web applications, testing your units, getting code coverage. But one thing that remains is trying to debug your command line applications. Even today more and more applications aren't built for primarily the web, but for other purposes or many web frameworks have some kind of "console" component which allows you to easily create command line tools that deals with asynchronous handling of data, or just mere as cronjobs.

They walk you through the steps you'll need to be sure everything it set up correctly for PHPStorm to catch the debug calls:

  • Ensuring Xdebug is active
  • Validating that PHPStorm is listening for incoming requests
  • Configuring Xdebug on where to connect
  • Setting up the mapping for paths inside PHPStorm
0 comments voice your opinion now!
xdebug phpstorm unittest debug tutorial series part6 commandline

Link: http://dutchweballiance.nl/techblog/the-definitive-remote-debug-and-unittest-with-phpstorm-guide-part-6/

JetBrains.com:
Just-In-Time debugging and PHP Exception Breakpoints with PhpStorm and Xdebug
December 19, 2013 @ 09:30:59

On the JetBrains site there's a recent post showing you how to use just-in-time debugging and breakpoints in their PHPStorm IDE combined with the popular PHP debugging tool Xdebug.

In every project comes a moment where code stabilizes and we don't want to keep the debugger attached to our code all the time. Or maybe we just want to run our code and only attach the debugger when an error occurs or an exception is thrown. Meet Xdebug's just-in-time (jit) mode and PHP Exception Breakpoints in PhpStorm!

This feature makes use of the "jit" setting for the "remote_mode" setting that Xdebug offers to only send debugging information back to the remote debugger with an error occurs. They show you how to set up PHPStorm for these debugger connections and some example screenshots of it in action. The breakpoints feature compliments this functionality by allowing you to set breakpoints on which kind of errors you want to see information about (ex. warning, notice or deprecated issues).

0 comments voice your opinion now!
phpstorm debug exception xdebug justintime remotemode breakpoint

Link: http://blog.jetbrains.com/phpstorm/2013/12/just-in-time-debugging-and-php-exception-breakpoints-with-phpstorm-and-xdebug/

Derick Rethans:
Contributing Advent 1 Xdebug and hidden properties
December 02, 2013 @ 09:16:50

As a part of his "Advent Contribution" series Derick Rethans has posted about an update to XDebug that fixes a bug reported around hidden properties.

This first contribution is for bug #987: "Hidden property names not shown". In PHP it is possible to convert an array to an object. [...] Xdebug's standard HTML var_dump() as well as the CLI, the coloured CLI and the debugger interface DBGp all suffered from the same issues that numerical properties were not showing in output.

With the committed fix the output of the var_dump now shows these special property names with curly braces around them and makes them available via the property_get method. If you're interested in the actual commit, you can check it out here.

0 comments voice your opinion now!
advent contribute hidden properties xdebug vardump propertyget

Link: http://derickrethans.nl/advent01.html

NetTuts.com:
Xdebug - Professional PHP Debugging
August 29, 2013 @ 09:56:01

On NetTuts.com there's a new article introducing Xdebug, a powerful tool that can help you with debugging your PHP applications. It works by investigating what's happening "on the inside" and reporting it back to your debugger.

Well, technically, Xdebug is an extension for PHP to make your life easier while debugging your code. [...] But just imagine for a moment, as your applications evolve, you might get into the habit of sprinkling your code all over with little echos, var_dumps and custom debuggers. [...] The next question is: how do you debug in production? [...] Now lastly, have you ever wished to be able to step through your code, line by line, watch expressions, and even step into a function call to see why it's producing the wrong return value? Well, you should definitely dig into the world of professional debugging with Xdebug, as it can solve all of the problems above.

They walk you through the setup of a complete (MAMP-based) environment on an OSX installation. You'll also need Xcode and the command line tools to be able to compile Xdebug. They recommend installing Homebrew to make installing the needed tools easier. They use Homebrew to install the PHP 5.4 version of Xdebug which then compiles and outputs a shared module you can put in your PHP extensions directory.

On the other side of things, the article also helps you set up your IDE, in this case PHPStorm but it would work for lots of others - to accept the debug messages from the server. He includes a sample script with some calls to the Xdebug-enabled debugging functions and what kind of responses (with screenshots) you should see in your IDE.

0 comments voice your opinion now!
xdebug debugging extension homebrew mamp osx install tutorial

Link: http://net.tutsplus.com/tutorials/tools-and-tips/xdebug-professional-php-debugging/

Chris Jones:
Quick Debugging of PHP Scripts in Emacs with Geben and Xdebug
January 24, 2013 @ 11:19:47

Chris Jones has a new post showing how you can use Emacs and Xdebug for debugging with the help of the geben plugin.

When you want to test a PHP code snippet quickly, it's handy to do it within your day-to-day environment. For me, this environment is Emacs. The geben package for Emacs provides an interface to the DBGp protocol, such as used by Derick Rethans's standard Xdebug extension for PHP. With the combination of geben and Xdebug, I can quickly and efficiently step through execution of local files, examining code flow and data values.

He includes a ten step process (step 11 is basically "use it") that walks you through the installation of the full stack - PHP, Xdebug and geben - and the configuration changes you'll need to make to get them all working together. Some basic usage instructions are included, but if you want more details on using geben, check out the project's site.

0 comments voice your opinion now!
emacs xdebug tutorial install debug engen plugin


7PHP.com:
Interview with Derick Rethans - The Father Of The PHP Swiss-Army Knife aka Xdebug
January 14, 2013 @ 09:28:44

On 7PHP.com today Khayrattee Wasseem has posted his latest interview with a member of the PHP community - this time it's Derick Rethans "The Father Of The PHP Swiss-Army Knife aka Xdebug".

In this edition I talked with Derick Rethans the Father Of The PHP developer's Swiss-Army Knife aka Xdebug. Derick is an expert when it comes to the PHP Internals; no wonder he is viewed as a vibrant and "man of action" within The PHP Community. As a PHP Core Contributor, he has been at the crux of many PHP extensions and variations; the mcrypt, date and input-filter extensions, bug fixes, additions and even leading the QA team.

Derick answers questions about how he got involved with PHP and how he thinks it compares from then to now. He also talks some about what tools he uses for his development and more details behind Xdebug's origins and PHP extensions in general.

0 comments voice your opinion now!
interview community derickrethans xdebug


Joshua Thijssen:
Debugging remote CLI with phpstorm
December 24, 2012 @ 10:11:00

Joshua Thijssen has a recent post for all the PHPStorm users out there (or maybe investigating a new IDE) and are looking for a way to debug your PHP apps easily with XDebug. Well, he's come up with a step-by-step guide to help you get it all set up and working, complete with screenshots. He helps you debug command-line applications, but the setup will work for your web apps too.

Even in these days, with full-featured PHP IDEs around, I still see PHP developers using var_dump() and die() to debug their code. Not only is this a very bad way of "debugging", it has other dangers as well [...]. We've probably all been there,.. But we don't have to. Debugging your code properly through an IDE is quite easy, but one of the major problems is debugging CLI code. Since many frameworks like Zend, Symfony and micro-frameworks like Cilex can be used to create command-line apps, cronjobs and even "deamons", so how do we easily debug this kind of code?

He starts with the setup of a development instance (he recommends a clone-able virtual machine environment) and shows how o configure both XDebug and PHPStorm to work together happily. He shows what configuration options and steps you'll need to take to be able to debug the CLI apps too, including a command-line option to specify the IP to report the debugging into back into.

0 comments voice your opinion now!
commandline application debug xdebug phpstorm tutorial screenshots


Pablo Viquez:
PHP Step by Step Debugging with JMeter, XDebug & Eclipse PDT
December 06, 2012 @ 09:47:17

In a previous post Pablo Viquez talked about integrating JMeter and Zend Debugger for testing your PHP applications. In this new post he goes one more step in and talks about integrating Eclipse, JMeter and using XDebug this time for the debugging.

In a previous post I wrote about doing step by step debugging using Zend Debugger and Zend Studio making the calls from JMeter, however not everyone has Zend Server or Zend Studio installed, and since XDebug is an awesome project I though that will be awesome to do the same using XDebug. [...] As explained previously, using the browser for API debugging can be pretty hard or nearly impossible unless you build some sort of UI, which normally I do not have time to do, so JMeter is perfect for the job!

He includes the configuration changes that'll need to be made to Apache and how to set up and configure the new project in Eclipse. He also includes the setup of the jMeter plan (using his example) and executing it to execute the script/get the debugging information.

0 comments voice your opinion now!
tutorial debug jmeter xdebug eclipse configure setup


PHPMaster.com:
Debugging and Profiling PHP with Xdebug
November 23, 2012 @ 12:58:31

On PHPMaster.com today there's a new tutorial showing you how to effectively debug your applications with Xdebug, a handy tool that provides more detail around your errors just by installing it.

Xdebug is a free and open source project by Derick Rethans and is probably one of the most useful PHP extensions. It provides more than just basic debugging support, but also stack traces, profiling, code coverage, and so on. In this article you'll see how to install and configure Xdebug, how to debug your PHP application from Netbeans, and how to read a profiling report in KCachegrind.

He walks you through the installation process (installing it from a package, not compiling) and how to enable it in your "php.ini" configuration file. He also shows how to hook it into the debugger on your IDE (in this case Netbeans) to receive debug messages and be able to step through the code to easily locate the issues. Also included is some basic information about profiling your application and viewing the resulting data in something like Kcachegrind or Webgrind

0 comments voice your opinion now!
debug profile xdebug tool tutorial install configure



Community Events











Don't see your event here?
Let us know!


framework overview hack install performance facebook application security unittest language hhvm composer symfony2 introduction release package podcast component opinion database

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework