Xdebug doesn't work [message #1859122] |
Fri, 12 May 2023 16:05 |
Gérarrd LE REST Messages: 7 Registered: May 2023 |
Junior Member |
|
|
Hi,
configuration:
ubuntu 22.04
php 8.1
java 19
eclipse 2023.03
" Debug As PHP CLI" doesn't work. php-xdebug is installed. But the software Eclipse says the opposite.
gerard@gerard-ThinkCentre-M700:~$ php -v
PHP 8.1.2-1ubuntu2.11 (cli) (built: Feb 22 2023 22:56:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2-1ubuntu2.11, Copyright (c), by Zend Technologies
with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans
[Updated on: Sun, 14 May 2023 19:52] Report message to a moderator
|
|
|
|
|
Re: " Debug As PHP CLI" doesn't work (eclipse) [message #1860270 is a reply to message #1859136] |
Wed, 26 July 2023 10:10 |
Philippe Debrabant Messages: 3 Registered: July 2023 |
Junior Member |
|
|
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 #1867266 is a reply to message #1860390] |
Thu, 20 June 2024 09:29 |
wadu nade Messages: 1 Registered: June 2024 |
Junior Member |
|
|
Why does Eclipse on my new Linux Mint setup require "xdebug.start_with_request=yes" for Xdebug to work, causing it to run even when I just want to execute normally? On my older system, Xdebug works fine without this setting. Could this be a bug in Eclipse, or maybe even related to settings affecting XDEBUG_SESSION visibility?
[Updated on: Wed, 31 July 2024 01:08] by Moderator Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02989 seconds