Setup instructions are not working for me

I am tryng this product out on a trail evaluation.  I wanted to like this IDE as it has so many great reviews.  So far, I find it very frustraing to setup.

I am running on Snow Leopard, using localhost.  I have xdebug installed as I can use it fine with other IDEs.

I have tried walking through the pages found on:

Several useful links about Xdebug and PhpStorm:
http://blogs.jetbrains.com/webide/2011/03/configure-php-debugging-in-phpstorm-2-0/
http://confluence.jetbrains.net/display/WI/Documentation

I did get it to actually run sorta of once, but I have NO IDEA what I did to get it sorta working that one time.

Three things that are glaring issues:

1) Not stopping on any breakpoints, just rendering the page as though I had only asked to display in the browser.  I hit the little listening icon, I get a "connected" in the variable window of the IDE, but nothing but the Console spitting out "Error in parsing value for 'filter'.  Declaration dropped." over and over.
2) (When it seemed to work this one time) It's debugging all this JavaScript stuff ?  What if I just want to debug a simple PHP environment?
3) In the http://blogs.jetbrains.com/webide/2011/03/configure-php-debugging-in-phpstorm-2-0/ walkthrough, not all the modes exist in version 3.x of this IDE, and it's "fuzzy" still how the modes work and in what use cases.

Other IDEs seem a lot easier to setup so far.

It seems a straight forward "getting started exists for this IDE", or, it's that something everyone is missing is just not being made clear.  Need a very straightforward setup walkthrough for a local environment maybe?  I donno....

Again, I WANT to like this IDE but I am really frustrated so far.  I hope I have given enough clues to pinpoint where my frustration lies, and you will be able to spot this right off.

Thanks,

-John

6 comments

Well, I did try the later page above.  I looked at your link and it doesn't look really that much different as far as the instructions are given.

I have got one mode to work:

Using the ‘PHP Web Application’ Run Configuration


I don't have the Zero-Config working yet the way I would expect.  I don't get any output to the browser. Should I see the output there as well, at least at completion, otr if any errors are reported by the server/interpeter?   Is there a mode that works ike that like some other editors?

So, some progress?

Thanks,

-John

0

[quote]
1) Not stopping on any breakpoints, just rendering the page as though I had only asked to display in the browser.  I hit the little listening icon, I get a "connected" in the variable window of the IDE, but nothing but the Console spitting out "Error in parsing value for 'filter'.  Declaration dropped." over and over.
[/quote]

XDEbug has always been a pain to setup for me for all IDE's.  To break it down, keep in mind how XDEbug works.

You start the IDE listening on port 9000.
The page is loaded on the web server.  
1)XDebug checks for the existence of a magic cookie that tells it to debug the page.  
2)XDebug attempt to connect to port 9000 of the debugging client
3)XDebug sends positioning information to the client[I am on line 1 of /var/www/mytestsite/index.php]
4)The client must figure out that /var/www/mytestsite/index.php is stored locally as /projects/mytestproject/website/index.php
5)The client sends all the breakpoints currently configured up to the server, translating paths as needed.  IE "stop at line 50 on /projects/mytesproject/website/library/buggylibrary.php" but on the server it is /var/www/mytestsite/library/buggylibrary.php

Lots of potential problems here.
1a) Is the magic cookie that xdebug is looking for the one that your sending?
1b Do you have any security enabled on xdebug so that only connections from localhost will have the magic cookie honored
2a) XDebug can be configured in many different ways for connecting back to the client - it can connect to the same ip address which connected to it, it can connect to a specific address, it can connect to only addresses in a specific set, etc
2b) Is your IDE listening on the right port
4a) Is your mapping setup properly?  

This is exaceberated by the fact that the default behaviour for XDebug changes from version to version.   Because of this, I tend to avoid the "zero" configuration and go through and set all my options.  Don't trust the defaults.
I also find it helpful in the beginning to configure PHPStorm's IDE setting to always break on the first line.  

From your error message above[error in parsing value for 'filter'] - it would seem that your problem is part 4.  PHPSTorm is sending the wrong full path for the file to server.  So the server rejects it[file /var/www/projects/mytestsite/mytestproject/website/library/buggylibrary.php does not exist, for example.] and then since there are zero breakpoints set, it just runs through to the end.

Lastly, one thing I find confusing with debugging is that you have to reverse your server/client thinking.

The Web SERVER is running the php application.
PHP XDEBUG is running an xdebug CLIENT to connect to your IDE!
YOU are running an xdebug SERVER to process the connections.

So when XDEBUG talks about a 'server' it means the IDE NOT the web server!

Now the bad news...  I can't help past that as at the moment I failed in my last attempt to get XDebug to work.   The good news though is that after all the frustration with the above, I have decided the next time I try to get things setup I plan on installing and using DBGProxy - and that PHPSTorm supports it.  The main problem I have with troubleshooting is trying to figure out what the heck is going on.  Trying to parse through the console messages AND the xdebug logfiles[assuming I even got the permissions correct on the directory I wanted to create a logfile in!] is a real pain.
See http://derickrethans.nl/debugging-with-multiple-users.html for details on dbgproxy.

DBGProxy takes a lot of pain out of configuration and gives you a lot more options.  Now the process becomes:

The page is loaded on the web server.  
1)XDebug checks for the existence of a magic cookie that tells it to debug the page.   Included in that magic cookie is the "idekey" - a unique string to identify you[your name plus the name of the ide seems like a good choice!]
2)XDebug connects to the DBGProxy at the ip address and port number you configured.  It ALWAYS uses the same one!
3)DBGProxy uses the idekey to identify which user to send the traffic too.

Note, pre-setup for this on the IDE consisted of:
1) Configure your idekey
2) Start 'listening' for connections, which really means
2a) The IDE connects to the DBGProxy
2b) The IDE identifies itself by the configured idekey

So DBGProxy matches 2 client connections by idekey and ties them together

Even better, you can configure DBGProxy to LOG EVERYTHING and now you can find ALL communications mismatches by checking a single logfile!

DBGProxy adds even more functionality if you have multiple developers, as they can all use the same proxy.  It also works great if your running multiple LANGUAGES.  For example, let's say in the middle of your PHP application, you call an exec to run a python utility.   Python has it's own remote debugging tools and it also can use DBGProxy as the middleman.  So when it comes to the exec point - if you make sure to include the ide key for your python ide - and the python ide is running and connected - then when the python script starts, you can switch over to the python IDE and debug that also!

[quote]


2) (When it seemed to work this one time) It's debugging all this JavaScript stuff ?  What if I just want to debug a simple PHP environment?
[/quote]

Both chrome and firefox ALSO support remote debugging for web page loading.  So when THEY start loading a page they will connect to an IDE and as they process the incoming html and javascript you can step through your code.  PHPStorm can act as a remote debugger for them ALSO!  Unfortunately the "debug" buttons on the toolbar lack labels, so I found myself frequently hitting the WRONG button.
0

Gary,

Thank for your time to answer in such detail.

Impressive effort on your part and it is much appreciated.

I will do my best to process all the details and apply them to my environment.  I mostly have things working I think and hopfully I will get the rest of the way there.

One really weird issue is that the debug fails to hault on the first line by default when configuered to do so.

Cheers,

-John

0

This is still an issue:

1) I can not get the output at the end of a debug to display in the external browser as a rendered page.
2) I can not get a debug session to automatically halt on the first line.

What information does support on this product need from me to resolve this?  The links to pages with instructions either have somthing assumed missing, or, they are not clear what detail is necessary to do something that seems very basic to other IDEs I am able to perform a debug this way.

Debugging is central and basic to development.

I hope that this can be resolved as I really want to like, purchase and use this product.

Sincerely,

-John

0

Ok, solved.  I thought it must be something simple.

You may think this is lame, but, the instructions are partly to blame.  The little phone icon, if you are going to use the zero config method, needs to be green.  I can't tell you how many times I looked at this and somehow got it in my little brain that it needed to be red.

Also, In all my messing around to try and sort this, I had unchecked the stop at first line tick box.  Very embarrasing.

I want to thank Serge for his quick response, patience and persistance in helping solve this.

Thanks,

-John

0

Please sign in to leave a comment.