php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73926 phpdbg will not accept input on restart execution
Submitted: 2017-01-13 14:13 UTC Modified: 2017-01-16 04:34 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: stahlstift at gmail dot com Assigned: bwoebi (profile)
Status: Assigned Package: phpdbg
PHP Version: 7.0.14 OS: Windows 10 Pro
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-01-13 14:13 UTC] stahlstift at gmail dot com
Description:
------------
With the test script doing:

C:\Users\username\PhpstormProjects\phpdbg>phpdbg
[Welcome to phpdbg, the interactive PHP debugger, v0.5.0]
To get help using phpdbg type "help" and press enter
[Please report bugs to <http://bugs.php.net/report.php>]
prompt> exec test.php
[Set execution context: C:\Users\username\PhpstormProjects\phpdbg\test.php]
[Successful compilation of C:\Users\username\PhpstormProjects\phpdbg\test.php]
prompt> l l 15
 00001: <?php
 00002:
 00003: // Generate some mock data
 00004: $example = [1, 23, 23423, 256436, 3463, 4363, 457];
 00005: foreach (range(1, 1000) as $val) {
 00006:     $example[] = mt_rand(1, 10000);
 00007: }
 00008:
 00009: // Stuff to debug
 00010: function doCoolStuff($value)
 00011: {
 00012:     $value++;
 00013:
 00014:     return mt_rand(1, 1000);
 00015: }
prompt> b 12
[Breakpoint #0 added at C:\Users\username\PhpstormProjects\phpdbg\test.php:12]
prompt> r
[Breakpoint #0 at C:\Users\username\PhpstormProjects\phpdbg\test.php:12, hits: 1]
>00012:     $value++;
 00013:
 00014:     return mt_rand(1, 1000);
prompt> r
Do you really want to restart execution? (type y or n): y
Please enter either y (yes) or n (no): y
Please enter either y (yes) or n (no): yes
Please enter either y (yes) or n (no): n
Please enter either y (yes) or n (no): no
Please enter either y (yes) or n (no): :(
Please enter either y (yes) or n (no): 

Test script:
---------------
<?php

// Generate some mock data
$example = [1, 23, 23423, 256436, 3463, 4363, 457];
foreach (range(1, 1000) as $val) {
    $example[] = mt_rand(1, 10000);
}

// Stuff to debug
function doCoolStuff($value)
{
    $value++;

    return mt_rand(1, 1000);
}

$lower = [];
foreach ($example as $key => $value) {
    if ($value < 100) {
        $lower[] = $value;
    } else {
        doCoolStuff($value);
    }
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-16 04:34 UTC] krakjoe@php.net
-Assigned To: +Assigned To: bwoebi
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC