PHPackages                             tacnoman/dephpugger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tacnoman/dephpugger

ActiveLibrary

tacnoman/dephpugger
===================

Debug for php in terminal.

1.5.2(6y ago)20412.5k14[3 issues](https://github.com/renatocassino/dephpugger/issues)[1 PRs](https://github.com/renatocassino/dephpugger/pulls)1MITPHP

Since Feb 26Pushed 3y ago7 watchersCompare

[ Source](https://github.com/renatocassino/dephpugger)[ Packagist](https://packagist.org/packages/tacnoman/dephpugger)[ RSS](/packages/tacnoman-dephpugger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (32)Used By (1)

[![Build Status](https://camo.githubusercontent.com/9d827f0d4fe46ffaabc0d752a058bc3d5026041d7cb8804ae9ab50c4d734cd4f/68747470733a2f2f7472617669732d63692e6f72672f72656e61746f63617373696e6f2f646570687075676765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/renatocassino/dephpugger) [![Maintainability](https://camo.githubusercontent.com/fb54b3e0b874759c13616673ed632cdec4d7701ee9d87a3e20142b803cfe7af6/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f63356430363465366334376633643163333930332f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/renatocassino/dephpugger/maintainability) [![GitHub license](https://camo.githubusercontent.com/d895ccadb374e43d69fdb6cae80fbc050b1489aeb017aea7c1d4c5285f1f753e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f72656e61746f63617373696e6f2f646570687075676765722e737667)](https://github.com/renatocassino/dephpugger/blob/master/LICENSE) [![GitHub tag](https://camo.githubusercontent.com/8c6b6560d8b531f4751c7e453aaf35820fc67f9071e6ba3b473ab0b6f66f9630/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f72656e61746f63617373696e6f2f646570687075676765722e737667)](https://GitHub.com/renatocassino/dephpugger/tags/) [![Packagist](https://camo.githubusercontent.com/69bc14183c86a31bda4e4ad16e00066a5a61a80b41ee553a809b840a5897b3a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72656e61746f63617373696e6f2f64657068707567676572)](https://packagist.org/packages/renatocassino/dephpugger)

[![logo](https://raw.githubusercontent.com/renatocassino/dephpugger/master/images/logo.png "Dephpugger logo")](https://raw.githubusercontent.com/renatocassino/dephpugger/master/images/logo.png)

What is 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
----------------

[](#web-applications)

### Lumen in example

[](#lumen-in-example)

[![dephpugger web](https://raw.githubusercontent.com/renatocassino/dephpugger/master/images/dephpugger-web.gif)](https://raw.githubusercontent.com/renatocassino/dephpugger/master/images/dephpugger-web.gif)`Image 1.0 - Screenrecord for debug web`

Cli Scripts
-----------

[](#cli-scripts)

[![dephpugger](https://raw.githubusercontent.com/renatocassino/dephpugger/master/images/dephpugger.gif)](https://raw.githubusercontent.com/renatocassino/dephpugger/master/images/dephpugger.gif)`Image 1.1 - Screenrecord for debug cli scripts`

Another example
---------------

[](#another-example)

[![dephpugger](https://raw.githubusercontent.com/renatocassino/dephpugger/master/images/demo.gif)](https://raw.githubusercontent.com/renatocassino/dephpugger/master/images/demo.gif)

Install
=======

[](#install)

To install you must run this code (using the composer).

```
$ composer require tacnoman/dephpugger
```

Install globally
----------------

[](#install-globally)

### In Linux or Mac Os X

[](#in-linux-or-mac-os-x)

Run this command:

```
$ composer global require tacnoman/dephpugger
```

And add in your ~/.bash\_profile.

```
export PATH=$PATH:$HOME/.composer/vendor/bin

```

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:

```
$ composer exec dephpugger
```

This last command will run in local or global installation.

### In Windows

[](#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

[](#using-phar-file)

```
$ wget https://raw.githubusercontent.com/renatocassino/dephpugger/master/dephpugger.phar -O dephpugger
$ chmod +x ./dephpugger
$ mv ./dephpugger /usr/local/bin/dephpugger
```

Or installing via curl

```
$ curl https://raw.githubusercontent.com/renatocassino/dephpugger/master/installer.sh | bash

```

### Install XDebug

[](#install-xdebug)

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
```

Copy the `zend_extension=/usr/lib/php/20170718/xdebug.so` to last line in `/etc/php/7.2/cli/php.ini`.

### Docker

[](#docker)

```
$ docker run --rm -p 8888:8888 tacnoman/dephpugger:latest server

```

Dependencies
============

[](#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
-----------

[](#plugins-for)

- [Chrome](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc)
- [Firefox](https://addons.mozilla.org/pt-br/firefox/addon/the-easiest-xdebug/)
- [Safari](https://github.com/benmatselby/xdebug-toggler)
- [Opera](https://addons.opera.com/addons/extensions/details/xdebug-launcher/?display=en)

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
```

Usage
=====

[](#usage)

To usage you must (after installation) run two binaries in `vendor/bin` folder.

```
$ 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:

```
