Giter Club home page Giter Club logo

xdebug-devilbox-phpstorm-postman's Introduction

Use XDebug on a Devilbox with PhpStorm and Postman

Host OS

Tested on:

  • openSUSE 15.1 Leap
  • Fedora 30
  • Ubuntu 18.04.3 LTS
  • Pop!_OS 19.10 (might apply to most recent Ubuntu derivates)
  • Windows 10 Pro

Check before setup:

  • Accept in the firewall settings the port 9000 TCP

Follow the steps in the setup tutorial (optional).

Docker

Make sure to follow the Docker setup step in the setup tutorial.

Devilbox

(…for a multisite setup read this part of the Devilbox documentation…)

cd /_devilbox_install_dir_/cfg/php-ini-X.X/
cp devilbox-php.ini-xdebug xdebug.ini
nano xdebug.ini

Change these settings:

xdebug.default_enable  = 1
xdebug.profiler_enable = 1

xdebug.remote_enable       = 1
xdebug.remote_autostart    = 0
xdebug.remote_handler      = dbgp
xdebug.remote_port         = 9000
xdebug.remote_connect_back = 1

xdebug.idekey     = PHPSTORM
xdebug.remote_log = /var/log/php/xdebug.log

See the example .ini file.

Save and restart DevilBox (or use the handy startup script):

cd /_devilbox_install_dir_
docker-compose stop
docker-compose rm -f
docker-compose up -d 

… or when not everything is necessary:

docker-compose up httpd php mysql -d

If you get errors, check troubleshooting DNS related startup errors.

PhpStorm

Settings / Languages & Frameworks / PHP

  • Set CLI Interpreter by clicking on
  • Add a new interpreter by clicking on + then choose From Docker, Vagr…
  • Tick Docker and add the Docker Server and then choose under Image name : devilbox/php-fpm:X.X-work…

Settings / Languages & Frameworks / PHP / Debug

Xdebug
    Debug port: 9000 ☑️ Can accept external connections
    ☑️ Force break at first line when no path mapping specified
    ☑️ Force break at first line when a script is outside the project

Settings / Languages & Frameworks / PHP / Debug / DBGp Proxy

IDE key: PHPSTORM
Host:    0.0.0.0
Port:    9000

Settings / Languages & Frameworks / PHP / Servers

  • Add a new server +
  • Set the Name of the server
  • Set values of Host to localhost : Port to 80
  • ☑️ Use path mappings (…)
File/Directory Absolute path on the server
/home/user/devel/htdocs /shared/httpd/devel/htdocs

Postman

Under Query Params set the key: XDEBUG_SESSION_START and the value PHPSTORM Click on the link Cookies (beneath the Send button) and add a new cookie for the corresponding domain:

XDEBUG_SESSION=PHPSTORM; path=/; domain=.yourlocaldomain.loc;

xdebug-devilbox-phpstorm-postman's People

Contributors

marcandreappel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.