How can achieve what you can see below? I read this question but did not succeed. My OS is Lubuntu 13.10 which is based in Ubuntu 13.10
You are technically ready to go, but
there's one extra step that I like to do to make command line debugging nice
and quick. I create a bash script called "php-xdebug", which automatically
starts the debugger engine. The script looks like this (unix only): >
#!/bin/bash
export XDEBUG_CONFIG="idekey=xdebug"
/usr/bin/php "$@"
<
Run "chmod +x" on the file and put it somewhere in your $PATH list, and you can
then use this instead of php when debugging. For instance, instead of "php
myscript.php", run "php-xdebug myscript.php" to start the debugger session.
echo $PATH
, I can see many paths separated by:
One of them is the one I have just added. Inside that path, there is a file I am targetting. Problem is that I sourced my .bashrc but it seems that the terminal does not recognisephp-xdebug
command. The error saysphp-xdebug: command not found
– pablofiumara Dec 20 '13 at 15:33#!/bin/bash export XDEBUG_CONFIG="idekey=xdebug" /usr/bin/php "$@"
– pablofiumara Dec 20 '13 at 15:36php-xdebug.sh myscript.php
, php output appears in the terminal (there is no need to use the browser).The output is the same as if I typedphp myscript.php
. Does this means there are no bugs in the script, doesn't it? If I type in the terminalphp-xdebug.sh
, the terminal gets stuck. Is this right? – pablofiumara Dec 20 '13 at 15:48