michal-kocarek / PhpOnWindows

Bridge to PHP installed in Bash on Ubuntu on Windows
MIT License
76 stars 15 forks source link

How to debug this project #2

Closed jkroepke closed 7 years ago

jkroepke commented 7 years ago

Hi!

thanks for providing stuff like this. I have problems to runs your script with my IDE.

https://i.imgur.com/dPNSYsd.png

Whats wrong? How to enable a file based log?

jkroepke commented 7 years ago

Using fopen('log') instead STDERR to get some logs:

[.] Testing PHP configuration in IDE? Disable logging first!
[.] Bash path: C:\WINDOWS\System32\bash.exe
[.] CWD: C:\Program Files\Java\jdk1.8.0_121\jre\bin
[.] ENV: 
[.] Input arguments: -dxdebug.remote_enable=0 C:\Users\jan\AppData\Local\Temp\ide-phpinfo.php
[.] Linux arguments: -dxdebug.remote_enable=0 /mnt/c/Users/jan/AppData/Local/Temp/ide-phpinfo.php
[.] Linux command: php -dxdebug.remote_enable=0 /mnt/c/Users/jan/AppData/Local/Temp/ide-phpinfo.php
[.] Windows command: C:\WINDOWS\System32\bash.exe -c "php -dxdebug.remote_enable=0 /mnt/c/Users/jan/AppData/Local/Temp/ide-phpinfo.php"

Running the windows command via shell looks great.

alexlcdee commented 7 years ago

Have the same issue. Running script with IDE always failed.

When I modified script to write all output (STDERR and STDOUT) to files, I've got the following result: http://c2n.me/3IrXI2t

Setting up PHPUnit shows this text every time: http://c2n.me/3IrY6Fj

Debug output from PhpStorm and cmd: http://c2n.me/3Is5kP8

What configuration you've used? PHP version, architecture, thread safety, IDE version etc.

KatoPue commented 7 years ago

Same Problem here. cmd works, bash works, PhpStorm Terminal works, PhpStorm Console Tools does not work.

KatoPue commented 7 years ago

With the current Windows 10 Creators update, everything is working properly ^(^.^)^

jkroepke commented 7 years ago

Yeah, I will close it.