Debugging on locally hosted Remote Server

Hi,

I have PHPStorm installed on my iMac (4.0.3). I have an Ubuntu server in a VirtualBox hosted by my iMac that contains my CMS code (ProcessWire). I don't have the CMS code installed on the Mac - I am working against the VirtualBox using ExpanDrive. I just want to debug the code/templates that are on the virtual server.

I have tried to configure this but without success. Should I be able to do this? If so, how?

Many thanks.

9 comments
Comment actions Permalink

Hi Gary,

Yes, it is absolutely possible -- there is no big difference between local and remote (local remote or remote remote) debugging from PhpStorm side -- the key in proper path mappings.

Follow this article -- it should be enough (was definitely enough for me) as long as debugger on remote is configured correctly: http://confluence.jetbrains.net/display/WI/Zero-Configuration+debugging+with+PhpStorm+2.0

Other debugging articles: http://confluence.jetbrains.net/display/WI/Documentation

P.S.
It is recommended to have local copy of the project and then setup automatic deployment to remote host instead of working via network connection directly (latency issues, which in some cases will end up in bad performance or freezes).

0
Comment actions Permalink

Hi,

I followed the instructions. They seem to suggest that the code should also be on the local machine, in this case, my iMac. I don't actually have the code on my iMac. XDebug is set up perfectly on the remote server. I still don't stop at the breakpoint.

Any other suggestions?

Thanks.

0
Comment actions Permalink

If you are sure that you have all setup correctly but it still does not work -- then I can only suggest to collect debugger logs (both PhpStorm: http://devnet.jetbrains.net/docs/DOC-1202 as well as xdebug's own: http://xdebug.org/docs/all_settings#remote_log )

0
Comment actions Permalink

Hi Andriy

I installed MAMP and tried again. This time, I was able to see the breakpoint being hit but, I then got the following error:

Problem Loading Page

The connection was reset
        
          The connection to the server was reset while the page was loading.

Any ideas why this is happening?

Thanks.

0
Comment actions Permalink

Possibly buggy xdebug build. Which one you have?

0
Comment actions Permalink

Not sure why it says Netbeans?


xdebug support enabled
Version 2.2.0
IDE Key netbeans-xdebug
0
Comment actions Permalink

1) Latest stable is 2.2.1 -- try upgrading (2.2.0 is not that stable).

2) Also -- it could be your Apache settings -- maybe it configured to break script execution if it's over some certain number of seconds (although I'm not sure on this one)

3) Well -- you have configured it (xdebug) .. or maybe it came pre-configured like that -- I do not know, but by default IDE key is empty. At the end of the day it does not really matter as long as it works in PhpStorm (in Zero Configuration mode it will accept connection with any IDE key).


In any case -- please tryi debugging some very simple page first (few basic lines, like addition of 2 variables or something like that) in simple / brand new project -- this will allow you to ensure that debugger is configured and working properly (on both xdebug and PhpStorm side). Once it's done -- do that on your real project (the same script first, and then real pages).

  • If simple script works but other pages do not -- then it could be mapping issue (Settings | PHP | Servers).
  • If it crashes in the middle of the page -- quite likely it's xdebug bug (few of them were fixed in 2.2 branch .. but maybe some of them are still unresolved). In any case -- you should see where it breaks connection like that -- in certain place only .. or after a certain amount of time etc.
0
Comment actions Permalink

Hi,

I uninstalled MAMP because there isn't a later version of XDebug available without recompiling. I don't want to go there!

I installed the Zend CE Server. I then installed their FireFox toolbar and when I try to set it up, it says:

Cannot auto detect Zend Studio settings at port: 20080.

Make sure that Zend Studio v4.0 or newer is running on this computer
and is configured to work on this port. If you have an older version,
use the settings dialog to disable auto detection and manually configure
the Zend Studio settings.

I am not using Zend Studio, I'm using PHP Storm! Any idea how I can resolve this issue?

Thanks

0
Comment actions Permalink

PhpStorm works with Zend Debugger and Firefox toolbar -- please check the link in my original reply: http://confluence.jetbrains.net/display/WI/Documentation

0

Please sign in to leave a comment.