Problems with PHP debug

I'd like to use phpstorm as debugger with my ma. I'm using Mamp as server and Zend as debugger, but when I launch gives me the message:

Javascriptdebugger need to pass parameters to firefox so it requires full path to firefox-bin executable

I think also I was not able to set up well.

If O go in prefereneces -->PHP
and try to give the PHP Home Path I give
/Applications/MAMP/bin/php5.2/bin

but i recieve that message
"failed to check PHP installation: error while executing diagnostic script"

Somone can help me?

thanks a lot,

Guido

26 comments

Hello Guido,

What do you want to debug - script or a page on web-server?

Thank you for feedback!

0

Hi qant to debug my  php code in my localhost.

Thanks

0

Guido,

Ok, try to show you how to configure debugging step-by-step:

1. Create a new server in Project Settings -> PHP -> Servers
create_a_new_server.png
2. Create new "PHP Web Application" run configuration
run_configurations_combo.png
web_application_run_configuration.png
configuration.png
You are ready to debugging. Enable "break at the first line" option first time.

4. Start debugging
start_debuggin.png

Please try it and report here about results.

0

I try to follow your instructions but:
different are the system of the settings.

phps1.jpg

So i tried to configure but without success.

If I try the first one:

phps2.jpg

URL: localhost...
username:root
and mypassword valid for MAMP.

I get this messagge:

phps3.jpg

thanks,


Guido

0

Hello Guido Di Gioacchino,

The problem is that you select wrong servers.

server.png

You should setup server in PHP -> Servers.

0

The point is that there'isnt any voice of that type in PHP menu.

I tried to follow you but didn't find


phps4.jpg

For that reason I looked in other parts of the menu.

thanks,

Guido

0

Which PhpStorm version do you use? Must be v1.

Nikolay is refering to the EAP build (v2 beta, can grab here: http://www.jetbrains.net/confluence/display/wi)

0

Guido, what version of PHPStorm you running? You can check by selecting "About PHPStorm" from the PHPStorm menu (right next to the apple icon). I gotta a feeling you running version 1?

0

I'm using the trial version. 1.0.2.

So how to do?

thanks,
Guido

0

Ok. Under the "Run" menu. Select "Edit Configuration...". If memory serves me right, that's the easy way to set it up.

0

I would advise to install latest EAP build, as v2 is stable and should be released soon (well, was scheduled to the end of January) -- in this case you would not need to "learn" it again as PHP debugging (configuration part) is quite different and more advanced compared to v1. And you can follow Nikolay's post to set PHP debugging up.

0

I did he download of the Version 2.0

I did what you suggested..

The program request me to give the path for Php

I did the riaght path for php of MAMP

/Applications/MAMP/bin/php5.2/bin

the message is:

phps7.jpg

thanks,

Guido

what's the problem now?

0

This thread might offer some clues for setting up debugging with MAMP. http://devnet.jetbrains.net/message/5270529#5270529

Also, run phpinfo() and see exactly where your php is located. You are probably pointing to the wrong location.  I'm running Zend Server, so I can't help there.

0

Hello Guido,

Do you still have any troubles with setting up debugger in PhpStorm?

0

I do. Why does PHPStorm insist on using Firefox? Doesn't matter which browser I have as system default, it still uses Firefox. My second thought, is why does it require me to shutdown Firefox before debugging?

0

Hello Stephen,

Why does PHPStorm insist on using Firefox? Doesn't matter which browser I have as system default, it still uses Firefox

Never met this issue. Please describe your settings and use cases.

My second thought, is why does it require me to shutdown Firefox before debugging?

It shouldn't require that. Please descibe use case.

Thank you for feedback!

0

Stephen,

Are you talking about JavaScript debugger?

0

Ok I have Safari set as default. (I don't work on public websites. Everything I do is internal, therefore we have control of what our users run. We use Safari cause of it's HTML 5 features (Opera is allowed too).

But if I debug a page it launches Firefox. It also ignores any breakpoints I have on the page. The only way I can prevent this is to remove Firefox. Which I'd rather not cause it's what I use to watch online videos.. :)

Screen shot attached.



Attachment(s):
Screen shot 2011-01-27 at 9.18.08 AM.png
0

Another issue.. look at the attached image. Why when I want to debug 1 php file am I presented with 6 different options? And of course, nothing tells me what each one does.. so I end up guessing. If you look at the picture, it's obvious I want to debug "add_items.php". But there are 2 choices? What does each one do?



Attachment(s):
Screen shot 2011-01-29 at 3.58.30 PM.png
0

Look at the icons. They correspond the temprorary run configuration that was created.
And other (non-numbered) files - its the previous temp run configurations. Usually its up to 5 of them.
Just pres 0 to grasp the concept.

0

Ok thanks. But why show 5 at all? Why not just 2 options; "Debug this page", or "Debug the project"?

0

Well, because this popup was added to give quick KB-only access to ALL configurations. This means include ALL saved, temporary and a couple of dynamic -> the ones that you call current. Notice, that you always need to press SAME numeric accel for current file and test (if any). Ususally you don't need to read it unless you want to look for some specific configuration. And for that it has quick search. Take a peek at our environment:

Screen shot 2011-01-30 at 15.20.05 .pngScreen shot 2011-01-30 at 15.20.36 .png

0

Well I just downloaded the latest build. And of course I can't debug at all. Just reports "disconnected". Even though I have the xdebug extension setup in Safari and it worked in prior builds (and in netbeans). So I think I'm just gonna stop trying and wait until the official release of 2.0.

By the way, I removed Firefox from my system. Cause I was tired of PHPStorm launching it every time to debug. In build 114 is worked wonderfully with Safari. The last 2 builds have insisted on Firefox. I'm on Mac, so maybe that has something to do with it. Just giving you guys a heads up. Please look at that.

0

Hello Stephen,

Well I just downloaded the latest build. And of course I can't debug at all. Just reports "disconnected". Even though I have the xdebug extension setup in Safari and it worked in prior builds (and in netbeans). So I think I'm just gonna stop trying and wait until the official release of 2.0.


Probably you can lost your path mappings configuration after configuration file changes in the latest EAP. Please check your path mappings settings.

By the way, I removed Firefox from my system. Cause I was tired of PHPStorm launching it every time to debug. In build 114 is worked wonderfully with Safari. The last 2 builds have insisted on Firefox. I'm on Mac, so maybe that has something to do with it. Just giving you guys a heads up. Please look at that.

We didn't change anything in this area since 114. Please leave screenshot of you 'Web Browsers' settings('IDE Settings' -> 'Web Browsers').
Also please report a bug to our issue tracker - http://youtrack.jetbrains.net/issues.

Thank you for feedback!

0

Ok I manged to get the debugging working again You were right, sort of. It was the pathing I think. I just recreated the project and all is working now. The FIrefox issue is also corrected. So I suppose, after each EAP release I'll recreate my projects. Not a big deal. Thanks

0

Stephen,

Ok I manged to get the debugging working again You were right, sort of. It was the pathing I think.

Since EAP 103.43 debugger will break on the first line if path mapping is not specified for the script. I hope it will help to detect problems related to path mappings.

Thank you for feedback!

0

Please sign in to leave a comment.