Debugging console with XDebug in a remote server

These days I’ve been coding some commands to handle a newsletter with a work queue, so I needed the XDebug’s benefits to debug the commands. In a previous post I published the talk I did in Symfony VLC about the goodies of XDebug, but it lacked a part about debugging php scripts.

I usually use a dev server with Vagrant and provisioned with Puppet as dev environment. To get the basic configuration of the box I use Puphpet. Then I will explain what I did to use XDebug in this environment, that it’s pretty straight forward:

  1. Configure XDebug to enable the profiler
  2. Configure console’s environment
  3. Debug!

Adding Composer to a legacy code project

In a project of legacy code that I’m working with we have the needing to use some external libraries in order to do some tasks. Also, we planned to refactor the code step by step to introduce good practices, reduce coupling, code duplication, etc.

At this point we had to implement a cron job to send users like a newsletter. This task was the perfect opportunity to create the basic scaffold using Symfony components as it is isolated from the rest of the web application: we consume the data, but almost all the funcionality is new. Then, the first step was to introduce Composer to manage the vendor libraries and autoloading.

Un vistazo a Xdebug

El pasado viernes 4 de octubre estuve en la reunión mensual de @Symfony_VLC dando una charla sobre Xdebug. No es que sea un ninja, pero es una herramienta que me facilita bastante algunas cosas del trabajo diario.

It’s alive!!!

After much time thinking about writing a blog, finally it’s alive! As it’s my personal blog I will write about stuff that interests me :) Concretely I want to write about coding, problems that I find, tips and the big amount of stuff that I would learn.

My main development stack is PHP, Javascript, HTML, CSS, LESS… but I love to try new languages, tools, ways to solve problems, etc.

This is because I built the blog with Octopress. I based my theme in the classic theme and used Foundation as a bootstrap. I called Octozurb (I know, it isn’t quite original) and if you want fork it, but please, let me learn from your improvements.