Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 912  / 3 Years ago, fri, july 16, 2021, 3:43:07

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.

More From » filesystem

 Answers
0

The PATH is a list of folders which are automatically checked for executables when you run a program name. Here is what we do.



After the comment below there seems to be more of a problem so lets start from scratch.



Open gedit



Paste in



#!/bin/bash
export XDEBUG_CONFIG="idekey=xdebug"
/usr/bin/php "$@"


Save as



php-xdebug.sh


Go to the folder (in the terminal) with the file and run



chmod +x php-xdebug.sh


Then check what your PATH is with:



echo $PATH


You could move the file into one of the folders listed when you ran this command.



Normally a better solution is to edit the PATH (tutorial here) to search inside the folder where the script already is.



Now try:



php-xdebug.sh

[#27895] Saturday, July 17, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
afisird

Total Points: 193
Total Questions: 112
Total Answers: 111

Location: Angola
Member since Mon, Jul 12, 2021
3 Years ago
afisird questions
Wed, Jul 27, 22, 03:53, 2 Years ago
Sun, Mar 12, 23, 18:05, 1 Year ago
Sun, Dec 11, 22, 01:19, 1 Year ago
;