Sign inSign up

escalope/xdebug

By escalope

•Updated about 9 years ago

A xdebug module combined with apache server and php. Ideal for development.

Image
0

1.1K

escalope/xdebug repository overview

The container assumes the php project exists in the host filesystem. If the filesystem is /FOO, then the following instruction will mount /FOO within the container and make it accesible as http://localhost/FOO⁠

docker run --name cutest_thing -w /var/www/html/FOO -v /FOO:/var/www/html/FOO -d -p 80:80 -p 443:443 escalope/xdebug:latest /run.sh

To debug the application with xdebug, do the following:

  • ensure that you firewall allows incoming/outgoing communication with port 60010. In linux, this needs to be done for all interfaces.
  • install netbeans with php support, go to the tools->options->php->debugging and write as debugger port 60010
  • open with nebeans the php project in /FOO.
  • choose in the toolbar "debug project" in the combo or Debug->debug Project in the main menu. The netbeans in the status bar ought to indicate "waiting for connection"
  • a browser should open with URL http://localhost/FOO/index.php?XDEBUG_SESSION_START=netbeans-xdebug⁠
  • the netbeans should change status and start debugging. Whatever breakpoint you create, it will be used as expected, stopping the execution at that point and showing the call stack and variables
  • Each browser operation will trigger a debugging session that will finish when the server has finished processing the request
  • Don't stop the debugger. Just refresh the browser to trigger breakpoints again. If you stop the debug, you may need to restart netbeans again

Tag summary

Content type

Image

Digest

Size

153.8 MB

Last updated

about 9 years ago

docker pull escalope/xdebug