https://github.com/sokil/php-debug-utils
Debug utils for PHP
https://github.com/sokil/php-debug-utils
debug flamegraph php profiling remotedebug trace xdebug
Last synced: about 1 year ago
JSON representation
Debug utils for PHP
- Host: GitHub
- URL: https://github.com/sokil/php-debug-utils
- Owner: sokil
- License: mit
- Created: 2019-11-12T20:18:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-12T21:20:14.000Z (over 6 years ago)
- Last Synced: 2025-02-04T00:43:34.692Z (about 1 year ago)
- Topics: debug, flamegraph, php, profiling, remotedebug, trace, xdebug
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Debug utils for PHP
## Remote debugging
Mey be usefull when code executed on remote server, and PHP runtime needs to connect to IDE on local machine, but
remote server can not connect to local IDE directly.
First forward remote port to local port, accessible by IDE:
```
ssh -fN some-ssh-host -R 9000:127.0.0.1:9000
```
Then run script:
```
./debugRemote /path/to/some.php arg1 arg2
```
## Building flame graph
More info about flame graphs may be found in http://www.brendangregg.com/flamegraphs.html.
Run scipt and pass path target to SVG file:
```
./flameGraph /path/to/flamegrapg.svf /path/to/some.php arg1 arg2
```
Flamegrapg will be stored at /path/to/flamegrapg.svf