Download the PHP package tacnoman/dephpugger without Composer
On this page you can find all versions of the php package tacnoman/dephpugger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dephpugger
What is Dephpugger?
Dephpugger (read depugger) is an open source library that allows a developer to 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:
Web applications
Lumen in example
Image 1.0 - Screenrecord for debug web
Cli Scripts
Image 1.1 - Screenrecord for debug cli scripts
Another example
Install
To install you must run this code (using the composer).
Install globally
In Linux or Mac Os X
Run this command:
And add in your ~/.bash_profile.
Now, run source ~/.bash_profile
and you can run the commands using only $ dephpugger
.
Is possible to use the composer command to run the dephpugger. You can use:
This last command will run in local or global installation.
In Windows
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
Or installing via curl
Install XDebug
To install XDebug in Linux you must run:
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:
Copy the zend_extension=/usr/lib/php/20170718/xdebug.so
to last line in /etc/php/7.2/cli/php.ini
.
Docker
Dependencies
- 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)
Plugins for
You can run this commands to check your dependencies:
Usage
To usage you must (after installation) run two binaries in vendor/bin
folder.
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:
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:
Comands after run
When you stop in a breakpoint you can make theese commands:
Command | Alias | Explanation |
---|---|---|
next | n | To run a step over in code |
step | s | To run a step into in code |
set \ |
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:
These values will replace the default configuration.
Full documentation
To see the full documentation click here.
How to use with phpunit, behat, codeception and others
The documentation to use, click here.
Run tests
Bugs?
Send me an email or open an issue:
Renato Cassino - Tacnoman - \[email protected]\