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: 2020-05-18 13:45 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: stahlstift at gmail dot com Assigned: cmb (profile)
Status: Closed Package: phpdbg
PHP Version: 7.0.14 OS: Windows 10 Pro
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: stahlstift at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-16 04:34 UTC] krakjoe@php.net
-Assigned To: +Assigned To: bwoebi
 [2020-05-18 13:45 UTC] cmb@php.net
-Assigned To: bwoebi +Assigned To: cmb
 [2020-05-18 13:45 UTC] cmb@php.net
The problem is that phpdbg_ask_user_permission() does not cater to
Windows line endings.
 [2020-05-18 13:45 UTC] cmb@php.net
-Status: Assigned +Status: Verified
 [2020-05-26 15:47 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e483761a1e8ab058d9155688434c5fa9138f5ae1
Log: Fix #73926: phpdbg will not accept input on restart execution
 [2020-05-26 15:47 UTC] cmb@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC