Skip to content

Commit ffc72c3

Browse files
committed
set XDEBUG_REMOTE_HOST with meaningful value in xampp-app script
1 parent 546b7cd commit ffc72c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/xampp-app

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ function main() {
5151

5252
# mount directories' symbolic links which are outside of the base directory as volumes to the container
5353
local base=${PWD} volumes link candidate relative
54+
local host=$(ip -4 addr show scope global dev docker0 | grep inet | awk '{print $2}' | cut -d / -f 1)
55+
5456
for link in $(find "${base}" -type l); do
5557
candidate=$(readlink -f "${link}")
5658
[[ -d ${candidate} ]] && [[ ${candidate} != ${base}/* ]] && {
@@ -91,7 +93,7 @@ function main() {
9193
--env COMPOSER_ALLOW_XDEBUG=1 \
9294
--env XDEBUG_PROFILER_ENABLE_TRIGGER=1 \
9395
--env XDEBUG_CONFIG="idekey=phpstorm" \
94-
--env XDEBUG_REMOTE_HOST=host.localhost \
96+
--env XDEBUG_REMOTE_HOST="$host" \
9597
--env DOCKER_XAMPP_BIN_ENV="$env" \
9698
--env ACCOUNT="http://$name.localhost" \
9799
--volume ~/.local/share/xampp/"$name"/.bash_history:/home/app/.bash_history \

0 commit comments

Comments
 (0)