Bug #73926 [Ver->Csd]: phpdbg will not accept input on restart execution

From: Date: Tue, 26 May 2020 15:47:45 +0000
Subject: Bug #73926 [Ver->Csd]: phpdbg will not accept input on restart execution
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227180@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73926&edit=1 ID: 73926 Updated by: cmb@php.net Reported by: stahlstift at gmail dot com Summary: phpdbg will not accept input on restart execution -Status: Verified +Status: Closed Type: Bug Package: phpdbg Operating System: Windows 10 Pro PHP Version: 7.0.14 Assigned To: cmb Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2020-05-18 13:45:02] cmb@php.net The problem is that phpdbg_ask_user_permission() does not cater to Windows line endings. ------------------------------------------------------------------------ [2017-01-13 14:13:13] 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); } } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73926&edit=1

« previous php.bugs (#227180) next »