|
|
|
Re: " Debug As PHP CLI" doesn't work (eclipse) [message #1860270 is a reply to message #1859136] |
Wed, 26 July 2023 06:10   |
Eclipse User |
|
|
|
Hi,
Do you have found a solution ?
On my side, my configuration is :
- Linux Mint 21.2 Cinnamon
- Eclipse 2023-06
- PHP Development Tools (PDT) Zend and Xdebug Profiler Support 8.0.0.202306050832
- PHP 8.1 with Xdebug :
PHP 8.1.2-1ubuntu2.13 (cli) (built: Jun 28 2023 14:01:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2-1ubuntu2.13, Copyright (c), by Zend Technologies
with Xdebug v3.2.1, Copyright (c) 2002-2023, by Derick Rethans
For now, I only need to run PHP CLI only. So I configure my xdebug.ini with this content :
zend_extension=xdebug
xdebug.mode=debug
xdebug.start_with_request=yes
In the Eclipse's PHP executable configuration, I noticed that when I select the /usr/bin/php8.1 file, its path is replaced with "/run/user/1000/doc/3b978223/php8.1". For Xdebug, I use the 9003 port as it's the actual port for V3.x versions.
If I omit the last line (xdebug.start_with_request), Eclipse don't stop on the first line or any line with a breakpoint. If I active the xdebug logging, Xdebug says that it don't find the XDEBUG_SESSION environment variable definition, so it don't start. If I export this variable in the terminal and run my script in this terminal, the IDE connects and stop on the first line. I added this environment variable in the "Debug Configuration" of my script, but there's no effect. If I display the list of environment variables with
XDEBUG_SESSION is not showed (Eclipse's bug ?).
With "xdebug.start_with_request" I can run the debugger in Eclipse, BUT the debugger starts also when I ask to run the program normally (without the debugger).
I have an older Linux Mint partition on my desktop (20.3) with Eclipse 2022-xx, PHP 7.4.x and the corresponding Xdebug version. No problem to debug and no need to configure "xdebug.start_with_request=yes" in the xdebug.ini file.
|
|
|
|
|
|
Re: " Debug As PHP CLI" doesn't work (eclipse) [message #1869156 is a reply to message #1869144] |
Sat, 03 August 2024 05:54  |
Eclipse User |
|
|
|
I have installed eclipse via download from the site. Then i added the PHP packages via the market place. Then i configured the server from windows-preferences-php-servers. Then i configured the run configuration. Then I configured project-proprerties-php-debug. I think i did not use the flatpak package. Thank you for your time. I have worked 20+(and counting) h to understand this error.
|
|
|
Powered by
FUDForum. Page generated in 0.05273 seconds