Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote debugging #16

Open
JustAGuyTryingToCodeSomething opened this issue Sep 22, 2015 · 2 comments
Open

Remote debugging #16

JustAGuyTryingToCodeSomething opened this issue Sep 22, 2015 · 2 comments

Comments

@JustAGuyTryingToCodeSomething

I thought this worked a while back when I first tried it, but when I came back and tried it again recently I couldn't get a connection between Xdebug and php-debugger, so maybe a fooled myself and debugged the local machine by mistake!

I'm developing using using Windows 10. I probably tried it on Windows 8 or a Mac first time round. The remote is a Debian Linux box. The remote is configured to run XDebug remotely.

I've tested using the windows debugclient-0.9.0.exe client, and that could make a connection, so running the same commands (DBGP) and looking at the code installed with the plugin I've come to the following conclusions:

  1. /node/xdebug l75 server.listen(args[0], 'localhost'); is limiting connections to the localhost, meaning only local debugging is permitted. Changing this to server.listen(args[0]); enables php-debugger to connect to the remote unit.
  2. The file-names on breakpoints aren't matching the remote unit. I'm unsure how this is supposed to work but the dev machine is trying to match (break on) C:\home\http\phptest.php whilst the remote unit is /home/http/phptest.php. Clearly using the same operating system on both units would help here! Changing /lib/xdebug line 107 from f: breakPoint.fullPath to f: breakPoint.fullPath.slice(3).replace('','/'), resolves this issue and allows me to debug remote files.

Is remote debugging supposed to work? If so how - and why do I need to make these changes? If not can it be added as a future enhancement?

@isaacbacon1
Copy link

Same issue here. Developping on Win7 64-bit and using a ubuntu vagrant box as a webserver. PHP 5.6 / Apache 2.2.0 / Xdebug installed with remote debugging enabled.

@d4mation
Copy link

Issue still persists. I'd love to use this with my Vagrant box; but as it is, it can't tell it is there since it lives in a VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants