How to get eclipse with xdebug running? [message #1859262] |
Wed, 24 May 2023 13:10  |
Eclipse User |
|
|
|
Can someone please post a step-by-step walk-thru how you setup eclipse with xdebug on linux to get to the point where you can step-debug a simple file?
I already installed the 2023-03 (4.27.0) version of Eclipse and have xDebug 3.1.2; my PHP is Version 8.1.2-1ubuntu2.11.
I created a simple file:
<?php
$inipath = php_ini_loaded_file();
if ($inipath)
echo 'Loaded php.ini: '.$inipath.'<br/>';
else
echo 'A php.ini file is not loaded<br/>';
echo "<br/>before<br/>";
phpinfo();
echo "<br/>after<br/>";
?>
I can start the built-in server in run-mode and have my script executed at localhost. The first line printed is "Loaded php.ini: /etc/php/8.1/cli/php.ini", so that is not the php.ini specified in the /Servers/PHP Built-in Server at localhost-config/php.ini - branch of my project.
Xdebug is listed, so it at least got installed.
I also cant debug, any attempt to start this server in debug-mode yields strange error messages like this one:
_____
An internal error occurred during: "Creating console for /usr/bin/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/X11/php (24.05.2023, 19:07:19)".
class org.eclipse.debug.core.model.RuntimeProcess cannot be cast to class org.eclipse.php.internal.debug.core.launching.PHPProcess (org.eclipse.debug.core.model.RuntimeProcess is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @40b54762; org.eclipse.php.internal.debug.core.launching.PHPProcess is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3ec9822c)
_____
Can someone please tell me what is going on here? I had absolutely no luck googling for those strage error messages, that all relate to somehow eclipse not being able to create a console. There are lots of hits but none that vaguely seem to fit.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07367 seconds