Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work #8

Open
battlekeys opened this issue Nov 20, 2017 · 18 comments
Open

Does not work #8

battlekeys opened this issue Nov 20, 2017 · 18 comments

Comments

@battlekeys
Copy link

battlekeys commented Nov 20, 2017

When I try to add the php.cmd as a new CLI Interpretor in PHPStorm the "Checking PHP Installation" window opens and does not finish at all. If I click the "Cancel" button, the window will close and all the fields will be filled. But "Open php.ini in Editor" give me an error. Please see screenshorts.
As a result, xdubug don't work. Could you help me?
error
error 2

@ruslan-pelepets
Copy link

ruslan-pelepets commented Nov 20, 2017 via email

@battlekeys
Copy link
Author

Did you look?

@ruslan-pelepets
Copy link

ruslan-pelepets commented Nov 24, 2017 via email

@battlekeys
Copy link
Author

The problem is not in editing php.ini.
The problem is the PhpStorm does not stop at breaking points.
I have 2 configurations: one for OpenServer and one for WSL.
The configuration for OpenSrever is working without any problem.
The WSL configuration does not work.

@ruslan-pelepets
Copy link

Show your xdebug config from WSL

@battlekeys
Copy link
Author

Here is my php.ini connfig:
[Xdebug]
zend_extension = /usr/lib/php/20151012/xdebug.so
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
xdebug.remote_port=9001
xdebug.remote_mode=req
xdebug.idekey="PHPSTORM"

@ruslan-pelepets
Copy link

So yes, i cant debug too, in my case i am trying to run phpunit but it cant find ide-phpunit.php.
Try to use almost same php versions on windows and linux 7&7 or 5&5.

@battlekeys
Copy link
Author

I use the same php versions on windows and linux: both are php7.0
But it does not help: debug does not work.
Is it possible to fix it?

@ruslan-pelepets
Copy link

The only option now is to use ssh tunel for CLI scripts debug, check this:
https://mobilefish.de/debugging-php-cli-scripts-phpstorm-which-are-running-inside-remote-server

@ruslan-pelepets
Copy link

The other option - check Stop in the first line in debug options window and you will see the error and possible solution from jetbrains

@battlekeys
Copy link
Author

Then, as I believe, is your extension absolutely useless?
Is it not working in any case at all?

@ruslan-pelepets
Copy link

ruslan-pelepets commented Nov 25, 2017

It worked before)) Try this
https://user-images.githubusercontent.com/29253087/33229839-ee49a1d6-d1df-11e7-8e20-a937f98ec8b6.png
P.S. And it is not mine)) I have only patched it to use with php unit

@battlekeys
Copy link
Author

Yes but not now. It's a pity.
Thank you for your attention.
If you find any solution in the future please let me know.

@battlekeys
Copy link
Author

battlekeys commented Nov 25, 2017

https://user-images.githubusercontent.com/29253087/33229839-ee49a1d6-d1df-11e7-8e20-a937f98ec8b6.png

How did you see this error?
I don't have any info in my debug variables ...

@ruslan-pelepets
Copy link

ruslan-pelepets commented Nov 25, 2017

Ok, i've managed it.

  1. Add server 127.0.0.1 or 0.0.0.0 and add path mapping windows vs linux
    https://confluence.jetbrains.com/display/PhpStorm/Debugging+PHP+CLI+scripts+with+PhpStorm#DebuggingPHPCLIscriptswithPhpStorm-2.StarttheScriptwithDebuggerOptions
  2. Open php-bridge.php
    and before line $linuxCmd = ($envValues ? $envValues . ' ' : '') . 'php ' . implode(' ', $arguments);
    add this $envValues = ' PHP_IDE_CONFIG="serverName=!heReYourServerInStormMapping!"';
  3. The debug session started working after adding PHP_IDE_CONFIG env AND deleting another env XDEBUG_CONFIG=idekey=...
  4. Last PHPStorm is cnanged so we should provide fix for php-bridge.php

And enjoy))

@ruslan-pelepets
Copy link

ruslan-pelepets commented Nov 25, 2017

proof
2017-11-25_1442
servers
settings
tmp source code changes
php-source

@ruslan-pelepets
Copy link

Checkout new fixed version here - https://github.com/ruslan-pelepets/PhpOnWindows

@ruslan-pelepets
Copy link

Fixed path trasnlation, no need anymore in PHP_IDE_CONFIG env param))
Follow old readme for IDE setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants