Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pedrohenriqueromio/a7c418a0e7d7498be92e67506f339bd5 to your computer and use it in GitHub Desktop.
Save pedrohenriqueromio/a7c418a0e7d7498be92e67506f339bd5 to your computer and use it in GitHub Desktop.
.env usando php 7.4
cd {devilbox dir}/cfg/php-ini-7.4
criar arquivo xdebug.ini
"""
; Defaults
zend_extension=xdebug.so
xdebug.mode=profile
xdebug.client_port=9000
xdebug.client_host=172.16.238.1
xdebug.remote_handler=dbgp
xdebug.start_with_request=yes
; Controls the protection mechanism for infinite recursion protection
xdebug.max_nesting_level=250
; idekey value is specific to Visual Studio Code
xdebug.idekey=VSCODE
xdebug.log = /var/log/php/xdebug.log
xdebug.output_dir = "/var/log/php/cachegrind"
"""
os arquivos acima irão gerar os arquivos cachegrind dentro da máquina do docker naquela pasta, OBS, precisa dar permissão a pasta acima
Ao acessar a página serão gerados arquivos similar a este no debug
- cachegrind.out.1.gz
Podemos abrir com ferramentas como kcachegrind para monitorar os recursos da aplicação
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment