NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Set breakpoints in other directories


Joined: 27 Nov 2009
Posts: 98
Reply with quote
My project is located at /var/www/myproject and the public directory is at /var/www/myproject/public. I have PhpEd set up where the web server and project files are on a remote server.

For one of my composer vendor files, I am using https://getcomposer.org/doc/05-repositories.md#path which creates a symbolic link to /var/www/compositor_repositories/NotionCommotion/json-validator.

When debugging, the file /var/www/compositor_repositories/NotionCommotion/json-validator/src/JsonValidator.php is executing, however, breakpoints don't work.

I've added this directory as an additional directory. "[SFTP:devserver] /composer_repository/NotionCommotion" but it doesn't help. Don't know if it is related, but I included composer_repository/NotionCommotion and not composer_repository/NotionCommotion/json-validator.

How can I use breakpoints in other directories?

Thank you
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Symbolic links do not work there. They are first resolved by web server and/or php fcgi service like php-fpm to real path, then executed. So, from the php perspectives it does never run the files where _you_ expect them to run. It runs them in their physical location, therefore the breakpoints set in symlink'd path won't trigger.
What you need is to add extra mapping to tell the IDE that certain remote path (real path, like /somewhere/in/you/remote/host) is the same as *this* local path -- where your file is located. That's also required for remote projects - when you work with [SFTP:xxx] /yyy/zzz surrogates. These surrogates are considered as local path btw.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Nov 2009
Posts: 98
Reply with quote
Thanks dmitri,

Looks like I can't do this through the wizard, but must do so under properties -> Run & Debug- > Mapping for debugger. True?

Also, is there any documentation regarding this, and if so, can you point me in the right direction?

Thanks
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Right.
I'd recommend this article for better understanding on how it works http://www.nusphere.com/kb/technicalfaq/howto_set_project_mapping.htm
Sorry, it's a bit outdated.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Set breakpoints in other directories
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic