Skip to content

Commit bdbf5a4

Browse files
committed
Xdebug mode propagation helpers
1 parent 096ac7a commit bdbf5a4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ Start containers by running `dev up -v` in project working directory. If project
2222
- PHPUnit: `dev unit`
2323
- php cli: `dev php`
2424
- worker start (run.php): `dev worker`
25+
- Xdebug default enable: `dev xdebug`
26+
- Xdebug cli one shot: `dev debug script.php`

bin/dev-stack.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ if [ "$1" ] && [ "$1" == "down" ]; then
218218
compose_down
219219
exit 0
220220
fi
221+
if [ "$1" ] && [ "$1" == "xdebug" ]; then
222+
echo "(Re)starting containers with xdebug enabled"
223+
XDEBUG_MODE=debug
224+
compose_up > /dev/null
225+
exit 0
226+
fi
221227
if [ "$1" ] && [ "$1" == "up" ]; then
222228
if [ "$2" ] && [ "$2" == "-v" ]; then
223229
compose_up

0 commit comments

Comments
 (0)