0

I am using Visual Studio Code and have installed Xdebug 3.

I am trying to run the following code:

<?php

print("Please enter something:");
$something = readline();
print($something);

?> 

However, when I run the code and enter some text, I get the error message

Cannot evaluate code without a connection

as shown in this image

How am I able to make it so that readline works and is able to provide a value to the $something variable?

php.ini

zend_extension = xdebug
xdebug.mode=debug
xdebug.start_upon_error = yes
xdebug.start_with_request = yes
xdebug.remote_connect_back = 1
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.log = C:/xampp/php/tmp/xdebug.log
xdebug.client_host=localhost
xdebug.client_port=9000
xdebug.connect_timeout_ms = 2000

EDIT:

xdebug_info() pastebin

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Curtis_L
  • 7
  • 2
  • 6
  • I don't see a breakpoint being set? I also am not sure whether the "Debug Console" is the same thing as a normal Terminal console... – Derick May 19 '22 at 17:49
  • I have tried setting a breakpoint at each line to see if that would let me enter text, but it did not work. – Curtis_L May 19 '22 at 18:26

0 Answers0