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
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: