PHPstorm console input not working during debug sessions

落花浮王杯 提交于 2020-12-25 03:55:05

问题


I'm using a PHP script which expects user input from a command like fgets(STDIN). The problem is it no longer works in the newest version of PHPStorm (10).

The same works when I run it directly (without debugger enabled) and anything I enter in the console is sent to the script (on direct run).

But during a debug session, when I try to input text at the script's prompt, it does not go to the script. My best guess is that the new REPL feature is overriding user input in console during debugging. I say this because pressing the UP/DOWN arrows opens up a popup with all PHP function names.

It used to work correctly with last version.

How can I send user input to my PHP script with this new version? Am I missing something here?


回答1:


I'm not sure if this is the same thing, but I was running into this same problem, and I was able to get it working by deselecting the "Use Console Input" checkbox in the PHPStorm Console.




回答2:


John's answer is perfect. I want to mention that the Use Console Input is a tiny icon in sidebar of the debug console. I provide you by this image



来源:https://stackoverflow.com/questions/34438892/phpstorm-console-input-not-working-during-debug-sessions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!