Created
November 18, 2020 16:26
-
-
Save massiws/5604e829474c7426d8370237ba2e2d3f to your computer and use it in GitHub Desktop.
Devilbox config for PHP/MySQL/xDebug in VSCode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Disable ONLY_FULL_GROUP_BY MySQL option in Devilbox | |
; | |
; Add a file cfg/mysql-X.Y/custom.cnf (or any filename with .cnf extension) | |
; make sure to fit your "X.Y" MySQL version! | |
[mysqld] | |
sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ---------------------------------- | |
; Xdebug settings for Linux | |
; ---------------------------------- | |
xdebug.default_enable = 1 | |
xdebug.profiler_enable = 1 | |
xdebug.remote_enable = 1 | |
xdebug.remote_handler = dbgp | |
xdebug.remote_port = 9000 | |
; The Linux way | |
xdebug.remote_connect_back = 1 | |
xdebug.idekey = VSCODE | |
xdebug.remote_log = /var/log/php/xdebug.log | |
; Optional: Set to true to always auto-start xdebug | |
xdebug.remote_autostart = false | |
; vim: set ft=dosini: | |
; ---------------------------------- | |
; Xdebug settings for Windows (WSL2) | |
; ---------------------------------- | |
xdebug.default_enable = 1 | |
xdebug.remote_enable = 1 | |
xdebug.remote_port = 9000 | |
; The Windows way | |
xdebug.remote_connect_back = 0 | |
xdebug.remote_host = IP_ADDRESS(*) | |
xdebug.idekey = VSCODE | |
xdebug.remote_log = /var/log/php/xdebug.log | |
; Optional: Set to true to always auto-start xdebug | |
xdebug.remote_autostart = false | |
; vim: set ft=dosini: | |
(*) To get IP_ADDRESS open terminal and run `ipconfig`: the correct address is "IPv4 Address" in "vEthernet (WSL)" section |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IMPORTANT: make cnf files read only:
cd devilbox/cfg/mysql-X.Y/
host> chmod 0444 *.cnf