It is a bash script for the fast enabling/disabling Xdebug.
Prerequisites
- Ubuntu or Debian
- Font Awesome
Alt+F2 > gnome-tweaks > Fonts > Monospace Text = SourceCodePro+PowerLine+Awesome Regular Regular 11
apt install fonts-font-awesome gnome-tweaks
-
Clone repository
git clone https://github.com/yutv/xdebug-toggle cd xdebug-toggle
-
Install xdebug-toggle
sudo ./install.sh
-
Insert the following line into ~/.bashrc
export PS1=$(echo "$PS1" | sed -E 's/(\])(\\\$)/\1\\[\\e[0;38;05;197m\\]$(ps1-xdebug-status)\\[\\e[0m\\]\2/')
-
Allow xdebug to be run as su without password
sudo visudo yutv ALL = NOPASSWD: /usr/local/bin/xdebug
where
yutv
is a user name -
Reconnect SSH/Bash Terminal
xdebug # enable Xdebug
xdebug # disable Xdebug