PHP CLI application debug in ZendStudio (STDIN)

Posted by Yuriy on Stack Overflow See other posts from Stack Overflow or by Yuriy
Published on 2010-06-01T19:12:12Z Indexed on 2010/06/01 19:13 UTC
Read the original article Hit count: 389

Filed under:
|
|
|
|

0

I am trying to debug php CLI using Zend Studio. My problem: I can't get user input from keyboard.

This is part of code (method in some class):

public function getInput($promt = null, $defaultValue = null) {
    if(!isset($promt)){
        $promt = self::$DEFAULT_PROMPT;
    }
    echo $promt;
    $stdin = fopen ( "php://stdin", "r" );  
    $val = fgets ( $stdin );
    return $val;
}

So ZS walks through code quite ok, but it stops at $val=fgets() And I have no clue where am I supposed to enter something from keyboard. I tried in console, and everywhere, I chacked debug configuration (Allocate console = on) etc.

HELP!

© Stack Overflow or respective owner

Related posts about php

Related posts about debug