Dephpugger

Dephpugger

  • Docs
  • About Us

›Usage

Dephpugger

  • About

Installation

  • Dependencies
  • XDebug
  • Composer
  • Browser Plugin
  • Dephpugger

Usage

  • Usage Video Tutorial
  • Running Dephpugger
  • Commands to Run
  • Running for Web
  • Running with PHPUnit

Configuration

  • File Configuration
  • Lumen
  • Laravel
  • Zend Framework 2
  • Symfony
  • Slim
  • Silex
  • Yii2

Running Dephpugger

About Dephpugger

Now, you have installed the Dephpugger in your machine. You can run this command to see if all is ok. For the next tutorials we will use the command dephpugger global. If you are using local, you can change the command dephpugger to php vendor/bin/dephpugger.

$ dephpugger requirements

You will see this.

Running Dephpugger

To run a webserver debug or a cli application debug, you must start two windows in terminal. In the first to start a webserver built-in or cli and in the second, the debugger.

Open a terminal and run this command:

$ dephpugger debug

You will see this.

The debugger start a socket server in port 9005 and now is waiting a breakpoint. Now, create a simple php file to test.

<?php

# File test.php

$int = 1;
$array = ['one', 'two', 'three'];

echo $int;
echo $array[1];

Now, add a command xdebug_break(); in your code. Like this.

<?php

# File test.php

$int = 1;
$array = ['one', 'two', 'three'];

xdebug_break(); # <-- Add this line

echo $int;
echo $array[1];

Open another terminal, and run.

$ debugger cli test.php

The breakpoint is created, and you can see the debugger start.

← Usage Video TutorialCommands to Run →
  • About Dephpugger
  • Running Dephpugger
Dephpugger
Docs
Getting StartedUsageConfiguration Reference
Articles and Videos
How debug Drupal applicationsSingapore PHP User GroupHow debug PHP in terminal
More
BlogGitHubStar
Copyright © 2024 Tacnoman