Remote debugging with Zend Debugger - getting remote files from server w/o path mapping

Hi,

Is it possible with PhpStorm to debug 'remote copy' of the file, w/o defining a mapping while using Zend Debugger? Zend Studio has such a feature. Here is an extract from its documentation:

If none of the options in the Matching items list represent your desired file location, you may select the 'Get content from the server for the following path' option. This means that whenever this path is called during the debugging/profiling process, it will only be searched for on the server. (This is done using PHP's search mechanism - see http://il2.php.net/manual/en/function.include.php for more information.)


This is especially actual for various php files, generated on server. For example, Symfony2 generates a substantial amount of PHP files under cache/ folder (such as compiled service container, compiled templates etc.) So, when debugging such project remotely, I don't have local copies of these generated files (and actually don't want to have them). However, if during debug session I "Step into" something requiring a file, which is available on server only the debug session breaks.

If this feature is not avialable - is it at least planned? Thanks!

0
6 comments

Hello Konstantin,

However, if during debug session I "Step into" something requiring a file, which is available on server only the debug session breaks.

This behaviour(specific for Zend Debugger only) already improved in upcoming PhpStorm 3.0 - it is allowed to 'step into' files without annoying popup messages, but getting content of such files is not supported yet.
Please submit an issue - http://youtrack.jetbrains.net/issues/WI

Thank you for feedback!

0
Avatar
Konstantin Tjuterev

Hello Nikolay,

Thanks for your reply. But I'm not sure I understand how 'Step into' is possible without mapping message, if getting content of the file is not supported. I mean what will I see when I "Step into" a file with the content IDE can't receive and mapping is also unknown? Could you elaborate please? Thanks!

0

Hello Konstantin,

However, if during debug session I "Step into" something requiring a file, which is available on server only the debug session breaks.

But I'm not sure I understand how 'Step into' is possible without mapping message, if getting content of the file is not supported.

Fixed in PhpStorm 3.0 EAP (will be available soon) - http://youtrack.jetbrains.net/issue/WI-7042

I mean what will I see when I "Step into" a file with the content IDE can't receive and mapping is also unknown? Could you elaborate please?


We discussed a feature in our team some time ago - provide possibilty to obtain a local copy of the missing file. After donwloading such file it will be allowed to set breakpoints in it. It is already implemented in PyCharm (see http://blog.jetbrains.com/pycharm/2010/12/python-remote-debug-with-pycharm/) and I think it will be useful. Any ideas?

Thank you for feedback!

0
Avatar
Konstantin Tjuterev

Nikolay,

I have reviewed read your blog about implementation in PyCharm, and it actually looks great with one exception.

An option should be added somewhere in Debugger settings to choose default behaviour when a remote file is not found through local mapping. Something like a drop-down "Action to take on detecting remote file not avilable locally". You should probably set it to "Always ask" by default, which should simply show the popup with options, but there should be another value, called "Always download". An "Always offer Auto-detect" choice would also make sense.

"Always download" is critical when remotely debugging projects, which generate PHP files on the fly (such as Symfony2 with its cache warming etc.) Otherwise you'll have myriad of popups for every file and won't be able to debug normally.

0

Konstantin,

Something like a drop-down "Action to take on detecting remote file not avilable locally". You should probably set it to "Always ask" by default, which should simply show the popup with options, but there should be another value, called "Always download". An "Always offer Auto-detect" choice would also make sense.

Sounds reasonable. Thanks for sharing!

0

Konstantin,

I submitted an issue based on our discussion - http://youtrack.jetbrains.net/issue/WI-7486
Please vote.

Thank you for feedback!

0

Please sign in to leave a comment.