Dephpugger is an open source lib to make a debug in php direct in terminal, without necessary configure an IDE. The dephpugger run in Php Built in Server using another command. You can use for:
Dephpugger alternatives and similar libraries
Based on the "Debugging and Profiling" category.
Alternatively, view Dephpugger alternatives based on common mentions on social networks and blogs.
XHProf8.4 0.0 L1 Dephpugger VS XHProfXHProf is a function-level hierarchical profiler for PHP and has a simple HTML based user interface.
PHP Debug Bar8.4 0.0 L4 Dephpugger VS PHP Debug BarDebug bar for PHP
xDebug8.3 9.0 L4 Dephpugger VS xDebugXdebug — Step Debugger and Debugging Aid for PHP
Kint8.1 4.4 L1 Dephpugger VS KintKint - a powerful and modern PHP debugging tool.
Tracy7.3 5.2 L4 Dephpugger VS Tracy😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.
Barbushin PHP Console7.2 0.0 L3 Dephpugger VS Barbushin PHP ConsoleHandle PHP errors, dump variables, execute PHP code remotely in Google Chrome
PHPBench7.0 5.0 L5 Dephpugger VS PHPBenchPHP Benchmarking framework
PHPDBG6.1 0.0 L2 Dephpugger VS PHPDBGAn interactive PHP debugger.
Dontbug Debugger5.4 0.0 Dephpugger VS Dontbug DebuggerDontbug is a reverse debugger for PHP
PHP Console5.3 0.0 L4 Dephpugger VS PHP ConsolePHP Debug Console
APM4.2 0.0 L3 Dephpugger VS APMPHP APM (Alternative PHP Monitor)
XR3.0 5.2 Dephpugger VS XRLightweight debug utility for PHP
Z-RayA debug and profile tool for Zend Server.
Tideways.ioMonitoring and profiling tool
Blackfire.ioA low-overhead code profiler.
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Dephpugger or a related project?
What is Dephpugger?
Dephpugger (read depugger) is an open source lib to make a debug in php direct in terminal, without necessary configure an IDE. The dephpugger run in Php Built in Server using another command. You can use for:
Lumen in example
Image 1.0 - Screenrecord for debug web
Image 1.1 - Screenrecord for debug cli scripts
To install you must run this code (using the composer).
$ composer require tacnoman/dephpugger
In Linux or Mac Os X
Run this command:
$ composer global require tacnoman/dephpugger
And add in your ~/.bash_profile.
source ~/.bash_profile and you can run the commands using only
Sorry for this :/ I don't have Windos SO to run the Dephpugger, but I'm waiting your Pull Request to solve this ;D
But you can use Docker
Using phar file
$ wget https://raw.githubusercontent.com/tacnoman/dephpugger/master/dephpugger.phar -O dephpugger $ chmod +x ./dephpugger $ mv ./dephpugger /usr/local/bin/dephpugger
Or installing via curl
$ curl https://raw.githubusercontent.com/tacnoman/dephpugger/master/installer.sh | bash
To install XDebug in Linux you must run:
$ sudo apt-get install php-7.2-cli php-dev php-pear $ sudo pecl install xdebug
Find the last line, similar to:
You should add "zend_extension=/usr/lib/php/20170718/xdebug.so" to php.ini and
copy to your
php.ini file. To get the
php.ini file, you can run:
$ php --info | grep php.ini Configuration File (php.ini) Path => /etc/php/7.2/cli Loaded Configuration File => /etc/php/7.2/cli/php.ini
zend_extension=/usr/lib/php/20170718/xdebug.so to last line in
$ docker run --rm -p 8888:8888 tacnoman/dephpugger:latest server
- PHP 7.0 or more (not tested in older versions)
- Xdebug activate
- A Plugin for your browser (If you want to debug a web application)
You can run this commands to check your dependencies:
$ vendor/bin/dephpugger requirements $ vendor/bin/dephpugger info # To get all values setted in xDebug # Or in global $ dephpugger requirements $ dephpugger info
To usage you must (after installation) run two binaries in
$ php vendor/bin/dephpugger debugger # Debugger waiting debug $ php vendor/bin/dephpugger server # Server running in port 8888 # Or in global $ dephpugger debugger $ dephpugger server
You must run in two different tabs (in next version you'll can run in an uniq tab). After run theese commands, you need to put the follow line in your code:
<?php # ... xdebug_break(); # This code is a breakpoint like ipdb in Python and Byebug in Ruby # ....
Now, you can open in your browser the page (localhost:8888/[yourPage.php]). When you request this page your terminal will start in breakpoint (like the image 1.0).
To debugger a php script, you could run:
$ php vendor/bin/dephpugger cli myJob.php # Or in global $ dephpugger cli myJob.php
Comands after run
When you stop in a breakpoint you can make theese commands:
|next||n||To run a step over in code|
|step||s||To run a step into in code|
|set <cmd>:<value>||Change verboseMode or lineOffset in runtime|
|continue||c||To continue script until found another breakpoint or finish the code|
|list||l||Show next lines in script|
|list-previous||lp||Show previous lines in script|
|help||h||Show help instructions|
|$variable||Get a value from a variable|
|$variable = 33||Set a variable|
|my_function()||Call a function|
|dbgp(<command>)||To run a command in dbgp|
|quit||q||Exit the debugger|
Configuration (is simple)
The Dephpugger project has default options like a port, host, socket port, etc. You can change this values adding a file
.dephpugger.yml in root directory project.
You can create in your
.dephpugger.yml file the configurations. Like this:
--- debugger: host: mysocket.dev # default: 0.0.0.0 port: 9002 # default: 9005 lineOffset: 10 # default: 6 verboseMode: false # default: false historyFile: ~/.dephpugger_history # default: .dephpugger_history server: host: myproject.dev # default: 0.0.0.0 port: 8080 # default: 8888 path: ./public/ # default: null file: index.php # default: null
Theese values will replace the default configuration.
To see the full documentation click here.
How to use with phpunit, behat, codeception and others
The documentation to use, click here.
$ composer test $ composer lint
Send me an email or open an issue:
Renato Cassino - Tacnoman - <[email protected]>
Articles and Videos
*Note that all licence references and agreements mentioned in the Dephpugger README section above are relevant to that project's source code only.