Skip to content

Instantly share code, notes, and snippets.

@XOlegator
Created September 1, 2020 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XOlegator/937a971da170205d2d51bb38f11ce482 to your computer and use it in GitHub Desktop.
Save XOlegator/937a971da170205d2d51bb38f11ce482 to your computer and use it in GitHub Desktop.
Xdebug URL handler for Sublime Text and PhpStorm
#!/usr/bin/env bash
# For PhpStorm
REGEX="^xdebug://(.*):(.*)$"
if [[ $1 =~ $REGEX ]]; then
/snap/bin/phpstorm --line "${BASH_REMATCH[2]}" "${BASH_REMATCH[1]}"
exit 0
fi
exit 1
#!/usr/bin/env bash
# For Sublime Text
request=${1:7}
/opt/sublime_text/sublime_text $request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment