Debugging seems to work but no execution point is shown in the editor

Hi There,

I have a strange problem with PHPStorm 1.0 on OSX.

The debugger seems to work kind of correctly, it connects and stops on breakpoints and displays variables. But the execution point is not shown in the editor - so I dont see exactly in which line the debugger is at the moment.
Please see attached film: http://screencast.com/t/YzBkMDIx

Is this a problem of OSX, do you have a fix / solution for it?

Many thanks, Stefan Haack

9 comments
Comment actions Permalink

Hi Stefan,

The issue is that <invalid frame> ({main}) down in the bottom left box.

I get this sometimes too.  the way to fix it is to go to the debug configuration screen and click on the "server paths mappings..." button.

a new box will open and there are 2 locations to enter some paths. "Local Path On Client" and "Local path on Server".

You will get your current situation if the local path on Server is set to /  It needs to be the full path on the server.

example:
LOCAL PATH ON CLIENT: /home/me/PhpstormProjects/example-site.com
LOCAL PATH ON SERVER: /var/www/vhosts/admin/example-site.com/httpdocs/

then try again.  this should change the <invalid frame> ({main}) into the name of the file that you are debugging.

Michael

0
Comment actions Permalink

Hi Michael,

it works! Thanks

Stefan

0
Comment actions Permalink

Guys,

Do you have your deployment and web paths specified at File | Settings | Deployment pane, Mappings tab?
If these paths are set, PhpStorm should not requite any input at Server paths mappings dialog.

Thanks,
Kirill

0
Comment actions Permalink

Hi Kirill,

The "Deployment path on server 'sitename.com' " option sets to a different path than the one at Run | Edit configurations | Server paths mappings....

* at Run | Edit configurations | Server paths mappings.... the "Local path on Server"  is an input box where i enter the full path from the root of the server.

Where as:

* at File | Settings | Deployment pane, Mappings tab on the "Deployment path on server 'sitename.com' " although there is an input box where anything could be input, there is also an '...' button.  Clicking on the '...' button pops up the root folder of the project.  Selecting it sets the path of the input box to the RELATIVE path from the project root, not the full "Local path on Server".

So in the  File | Settings | Deployment pane, Mappings tab  the path is set to "/" for all of my projects.

After your comment im wondering if the '...' is wrong and i should infact be setting this input box manually to "/var/www/vhosts/admin/example-site.com/httpdocs/"

0
Comment actions Permalink

Hello Michael,

First, sorry for somewhat unclear configuration UI, we're already working on an improved version.

Let me explain you in some more details:
terms:
local path on client = absolute path in the project on your machine, where PhpStorm is running, i.e. /home/projects/FooBar
deployment path = path on (s)ftp server or network share where your files can be deployed, i.e. /sites/FooBar (so the complete hypotethical path is ftp://ftp.myserver.com/sites/FooBar)
web path = part that is appended to the server URL to open your file in browser, i.e. /FooBar (so the complete URL is http://myserver.com/FooBar)
local path on server = absolute path in the server filesystem, i.e. /var/www/sites/FooBar

For debugging PhpStorm needs mapping between local path on client and local path on server.

Currently, PhpStorm tries to calculate this mapping by the following steps (done before the first start of debugging session):
1. find mapping that has deployment and web path specified (at Mappings tab)
2. upload diagnostic script file to the server at the deployment path from step 1
3. execute script by fetching URL corresponding to the web path from step 1 (script basically does "echo(__FILE__)", printing out local path on server)
4. calculate local path on server path that corresponds to FTP server root and extract the difference (for the examples above, difference is "/var/www")

Now, for any local path that has parent mapping specified (at Mappings tab) PhpStorm can calculate corresponding deployment path, and then find out local path on server path by appending it to the difference from step 4.

'Server paths mappings' button stands as a last resort, so usually you are not expected to use it.

Hope this makes sense,
Kirill

0
Comment actions Permalink

Hi Kirill,

Wow, great explanation. (and interesting stuff about how the IDE works too.) :)

I found the 'Server paths mappings'  because my server with xdebug on it is different from the live server.  I use it with 2 server mappings.

I have site-name.com  (which is live on the internet) and site-name.ooo which is local only and mapped in my /etc/hosts file to resolve.

I store the whole project under the directory:
/home/me/PhpstormProjects/site-name.com

and from there upload to both site-name.com and site-name.ooo.

Since the debugger is on site-name.ooo i need to setup the 'Server paths mappings' because it is different to the main server. (or i suppose i could also follow your directions above now too then change the 'default server' when i start debugging.)

Really great that you have thought about it enought to include different ways of getting stuff to work.

Im really liking working with PhpStorm.  Im absolutely blown away by the context checking.  Its awesome.

Michael

0
Comment actions Permalink

Straight for the FAQ/QB?...

0
Comment actions Permalink

Hello Michael,

Wow, great explanation. (and interesting stuff about how the IDE works too.)

Thanks, but it is something from under the hood, and we can't give any promise to keep this behavour the same in the next version.

For your setup I'd suggest the following PhpStorm configuration:
You set up two servers:
1. Production one is at site-name.com and accessible by (S)FTP
2. Debug one is at site-name.ooo and accessible either by mounted folder (if project is not under server's web root - this seems to the case since you're said you're uploading files to it), or is just local.

Then you mark your Debugging server default, and use 'Upload to' action to put files on the Production one. If you need to upload files to both servers at once every time, vote/watch http://youtrack.jetbrains.net/issue/WI-909.

Will it work for you?

Regards,
Kirill

0
Comment actions Permalink

Hi Kirill,

Will it work for you?

Its already working great for me.:)

My debugging server is on a virtualbox.  I like this because it has the feel of a remote server, but accessable offline.  I switch and swap between the production as the default server and the debugging server as the default server depending on whether the task im doing needs debugging or not.

(I used to have to have 2 separate code bases for this in eclipse)

when im doing stuff on the virtual box i start a new task which creates a change list.  Once im done with developing stuff on the development server, i commit the change list to git with the option of "AFTER COMMIT: 'Upload files to...' " and select the production FTP.

Works great.

Love the automatic save and automatic upload feature.

Michael

0

Please sign in to leave a comment.