From: krakjoe Date: Fri, 29 Nov 2013 19:54:55 +0000 (+0000) Subject: remote tutorial X-Git-Tag: php-5.6.0alpha1~110^2~30^2~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b6c8adea0129d62edba129afb0520f5c6b969ed;p=php remote tutorial --- diff --git a/tutorials/remote.md b/tutorials/remote.md new file mode 100644 index 0000000000..27882041e0 --- /dev/null +++ b/tutorials/remote.md @@ -0,0 +1,43 @@ +Remote Debugging +================ +*Using phpdbg across the network* + +It is sometimes useful to execute some code in the environment that exhibits some bugs; while there is a pretty good chance of being able to mock the environment that exhibited the bug on another machine, it is sometimes impossible or impractical. + +Remote debugging allows you to start an instance of phpdbg on any machine, and connect to it from any machine, bundled is a remote client implemented in Java: + +![phpdbg jui](https://raw.github.com/krakjoe/phpdbg/master/tutorials/java-example.png) + + +Starting phpdbg in Remote Console Mode +====================================== +*Starting the server ...* + +Simply open a terminal on the target machine and issue the command + +``` +./phpdbg -l4000 +``` + +This will initialize phpdbg in Remote Console Mode, using port 4000 for stdin and port 8000 for stdout. + +To stop the service, send *SIGINT* to the phpdbg process, this will force it to bailout, as gracefully as it ever does. + +*To get help using these options see the help menu in phpdbg "help options"* + + +Starting phpdbg-jui Anywhere +============================ +*Java is everywhere, so is phpdbg ...* + +A JRE is needed for the bundled remote client, given any operating system with a working installation of Java: + +``` +java -jar /path/to/phpdb-jui.jar +``` + +Will initialize the bundled client, simply configure the settings accordingly and press *Connect* + +If disconnection is normal, the environment persists - another team member can pick up the session where it is left off. + +Debugging remotely is no different to debugging locally, all of the same functionality is provided remotely.