Skip to content

Commit 574cfb1

Browse files
JCombeeJeroenBoersma
authored andcommitted
Added a dev command to enable and disable xdebug for cli usage
1 parent 01ec6c5 commit 574cfb1

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

bin/dev_command/console

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
local xdebugOutfile=${DEV_WORKPATH}/conf/xdebug;
12

23
dc yml_local;
34
dc service php;
@@ -12,6 +13,12 @@ if [ $# -lt 1 ]; then
1213
dc cmd bash -l;
1314
fi
1415

16+
if test -f "${xdebugOutfile}"; then
17+
dc opt -e XDEBUG_MODE=debug
18+
dc opt -e XDEBUG_SESSION=1
19+
dc opt -e PHP_IDE_CONFIG="serverName=`cat $xdebugOutfile`"
20+
fi
21+
1522
dc run "$@";
1623
return $?;
1724

bin/dev_command/xdebug-disable

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
local outfile=${DEV_WORKPATH}/conf/xdebug;
2+
3+
cd ${DEV_PATH};
4+
rm ${outfile};
5+
return 0;

bin/dev_command/xdebug-enable

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
local outfile=${DEV_WORKPATH}/conf/xdebug;
2+
3+
cd ${DEV_PATH};
4+
echo $1 > ${outfile};
5+
return 0;

0 commit comments

Comments
 (0)