Configuration problems again

Sorry again for proposing low level questions...
I'm working with the last version of PhPStorm an WAMPP server configuration.

After a couple of weeks I'm still fighting with debug configuration.
When I try to debug php on remote server, program stops at the code beginning but it is not able to step into or to hit any breakpoint.
File1.jpg shows the warning when the .php file is loaded and File2.jpg shows what I obtain when I click on "click to set up path mappings".

Starting from this point there is no way to setup path mapping so that OK button becames enabled.

Any suggestion?

Thank you,
Giorgio



Attachment(s):
File2.JPG
File1.JPG
13 comments
Comment actions Permalink

I forgot: I'm using XDEBUG...

0
Comment actions Permalink

Hi there,

You are clearly doing this wrong.

The mapping dialog clearly says: "Absolute path on the server", but you provide "Project path relative to Apache root..."

As far as I see it from here (based on your screenshots): there shoud be just a single mapping:

Local Path: D:\Cns\Sw\Web\CnsGate
Remote Path: D:\WebServerFiles\CnsGate

Alternatively:
Instead of opening project using D:\Cns\Sw\Web\CnsGate folder, just open it via D:\WebServerFiles\CnsGate path -- in this case no path mapping should be required (based on info shown on your screenshot ONLY)

0
Comment actions Permalink

Thank you Andriy,
but I tried everything without any result... The server disk is mapped on my debugging system as Z:, so if I provide "Z:\webserverfiles\CnsGate" (it exists!) to the "absolute path on server" should have to be accepted, instead the OK button is always disabled.
You can see it in File3.jpg: even if file mapping should be ok, the row marked with red '!' is undefined, neither I'm enabled to modify it.

Your "alternatively" option should be a drama for me because I needed more than a week to setup JS debug, I'm really afraid that if I change project settings to debug php will let me drive to a mountains of new problems.

Giorgio



Attachment(s):
File3.JPG
0
Comment actions Permalink
but I tried everything without any result... The server disk is mapped on my debugging system as Z:, so if I provide "Z:\webserverfiles\CnsGate" (it exists!) to the "absolute path on server" should have to be accepted, instead the OK button is always disabled.

Correct.

You better setup such path mapping in "Settings | PHP | Servers" instead of clicking the link on 1st image. Right now it asking specifically for location of "unstring\upload.php" and may not accept other mappings.

In any case: PhpStorm clearly says that the file in question is located on D: drive (D:\WebServerFiles\CnsGate\unstring\upload.php) -- I have no clue where your Z: comes from (I never used WAMP myself)

Your "alternatively" option should be a drama for me because I needed more than a week to setup JS debug, I'm really afraid that if I change project settings to debug php will let me drive to a mountains of new problems.

Unfortunately I have no clue what kind of problems you were having there -- for me it takes a minute or so to setup debugging mappings (but then I rarely code or debug JavaScript and even then my code is pretty simple -- maybe if I would have your code I could have problems setting it up as well -- don't know)

BTW -- you can always backup whole project folder (including .idea subfolder -- that's where your project settings are stored) and try opening as I have suggested -- it may just work. If it does not -- restore back from backup.

0
Comment actions Permalink

I'm new to WS but got debugging working for a .NET site.

What is this mapping thing compared to just creating a debug configuration?

0
Comment actions Permalink

>In any case: PhpStorm clearly says that the file in question is located on D: drive (D:\WebServerFiles\CnsGate\unstring\upload.php)

In my opinion this file path is signalled by the server (it is the real path where file are located in the server) and PhpStorm is not able to map this path to the mirror copy on the debugging machine. I checked all the .xml files in .idea directory of the project and there is no reference to "D:\web...".
I believe you when you say that in few minutes you can setup a debugging project, and I'm quite sure that I had an "original sin" in my project setup due to a lack in experience. My doubt is: phpStorm can be used only by experienced users or have I a chance to become one of them? :-)

>You better setup such path mapping in "Settings | PHP | Servers" instead of clicking the link

Form the attached image you can find that I did it, but it is absolutely ignored by the debugging runtime...

Thank you for you help and patience,
Giorgio

0
Comment actions Permalink

I hope you not really asking this to me! :-))

Giorgio

0
Comment actions Permalink

In my opinion this file path is signalled by the server (it is the real path where file are located in the server) and PhpStorm is not able to map this path to the mirror copy on the debugging machine. I checked all the .xml files in .idea directory of the project and there is no reference to "D:\web...".

Not exactly. Web server / PHP works with paths you give them ... but xdebug works with final/resolved paths only.

As far as I'm aware, based on info provided from your screenshots, the path mappings that I was given to you should resolve the issue. If you did exactly as per my advice and it still does not work .. then I do not know what else may be wrong (I believe it is still misconfiguration somewhere)

Form the attached image you can find that I did it, but it is absolutely ignored by the debugging runtime...

What "attached image"? If you referring to the previus images -- they are not made from "Settings | PHP | Servers" -- please show me that one (show as much file tree expanded as you can -- maybe you have wrong mapping there?).

My suggestion:
  • Delete any entry at "Settings | PHP | Servers;
  • Click "OK" to close Settings;
  • Open Settings again
  • Add new entry to "Settings | PHP | Servers"manually with the paths I gave you (and correct value in "Host" field -- take it from URL you use for debugging)
  • Try to debug again


If still nothing:

  • Close project in IDE;
  • Find .idea subfolder (your project settings);
  • Backup and delete it
  • Use "File | Open Directory" to open your project again
  • Reconfigure it from scratch
  • Try debugging again -- sometimes this helps somehow (in case there is some glitch with previously entered settings)


If you wish -- I can connect remotely to your computer (via TeamViewer, for example) and do it personally. You can email me to [my_first_name].[my_second_name]@gmail.com with details if you are happy with that.

Other than that -- there is not enough info to advise you anything else -- need to see more screenshots with your settings etc.

0
Comment actions Permalink

no was hoping someone else would reply, not you.

0
Comment actions Permalink

It's about PHP here, not JavaScript. But in any case...

What is this mapping thing compared to just creating a debug configuration?

Debug configuration only tells what to debug (what URL to run; other related parameters). "Mapping" thing tells what local (project) files are equivalents of remote (working) files (in other words: "mappings between files and folders deployed on the server and their local copies").

Xdebug (one of the PHP debuggers) works with resolved/final paths ONLY, so even if everything is local but symlinks are used, it still requires mapping to tell where to find "remote" file in the local project.

For JavaScript debugging you also have mappings: for "JavaScript Debug | Remote" type of configuration only -- you provide mappings directly in the debug configuration itself, while for PHP it's done on higher project settings level.

0
Comment actions Permalink

awesome, good to know that I only need to worry about configuration in the debug
config only.  Is that stated in your docs somewhere?

0
Comment actions Permalink

I do not write any docs -- I'm not associated with JB in any way.

In any case: Remote JavaScript debugging with WebStorm and PHPStorm - IntelliJ-Wiki -- this link should have all information required for successful JS debugging.

0
Comment actions Permalink

eh I find that section lacking but thanks.

0

Please sign in to leave a comment.