Questions tagged [xdebug-3]

Xdebug is a PHP extension with developing aids, a profiler, an interactive debugging, and a code coverage information gatherer.

Xdebug is an extension for PHP, and provides a range of features to improve the PHP development experience.

Step Debugging
A way to step through your code in your IDE or editor while the script is executing.

Improvements to PHP's error reporting
An improved var_dump() function, stack traces for Notices, Warnings, Errors and Exceptions to highlight the code path to the error

Tracing
Writes every function call, with arguments and invocation location to disk. Optionally also includes every variable assignment and return value for each function.

Profiling
Allows you, with the help of visualisation tools, to analyse the performance of your PHP application and find bottlenecks.

Code Coverage Analysis
To show which parts of your code base are executed when running unit tests with PHP Unit.


113 questions
1
vote
0 answers

Xdebug command line client will not run to breakpoint

I am unable to get the Xdebug command line client working https://xdebug.org/docs/dbgpClient. The client appears to connect OK but will not run to a breakpoint. I am trying to debug WordPress in Docker. First I use breakpoint_set then run. Then…
1
vote
1 answer

Failed loading Xdebug in PhpStorm

I tried to configure Xdebug following this tutorial https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html#updatingPhpIni but I keep getting this error ( the path is correct ) PS C:\Users\Yasmine Daly\Downloads\ES-184\EstimateV2> php…
Yasmine Daly
  • 116
  • 7
1
vote
1 answer

php7.4 Xdebug xdebug.mode = debug is not working for me

I have installed Xdebug on a Ubuntu 20.04 system. I followed this documentation , which I found to be quite well written, and got everything installed per the specs. (I used apt rather than yum, and placed the .so file into /usr/lib/php/20190902…
Vipan Kumar
  • 29
  • 1
  • 7
1
vote
0 answers

Xdebug end step debug session directly from source code

Due to some system limitations I have to manually start a Xdebug connection with xdebug_connect_to_client();. Later I want to end the step debugging session manually directly from the code so the IDE automatically also ends it. I tried using…
Alex Wulf
  • 11
  • 1
1
vote
1 answer

PhpStorm Xdebug breakpoints disappearing?

I'm using Xdebug and PhpStorm to debug a PHP application. It's all working perfectly in terms of actually doing the debugging, however, intermittently PhpStorm will remove all the breakpoints I've set up. There seems to be no pattern or action which…
BT643
  • 3,495
  • 5
  • 34
  • 55
1
vote
1 answer

Setting xdebug 3 Config Values In htaccess File

I'm trying to set some xdebug 3 config values in an .htaccess file, but I keep getting "500 Internal Server Error" results. With xdebug 2 I could set config values by using php_flag instructions, such as: php_flag xdebug.remote_autostart on With…
Mr Glass
  • 1,186
  • 1
  • 6
  • 14
1
vote
2 answers

Xdebug always listening for new requests and prevents webpages from loading in case I don't listen

I have a strange setup on my new workplace and it works like this: if I have PhpStorm running and have "Start Listening for PHP Debug Connections" on, then my local PHP application works fine. As soon as I close PhpStorm completely (and consequently…
anonyasd
  • 15
  • 4
1
vote
2 answers

Make Xdebug ignore multiple requests

I have several places in my app where I call an API endpoint every 60 seconds. When I try to debug with Xdebug the controller that is associated to that endpoint it often takes me more than a minute while I think/step over and so on, so I end up…
assensi
  • 352
  • 1
  • 6
  • 17
1
vote
0 answers

__DIR__ not resolved properly while debugging in Xdebug

I see that the weird issue with DIR and Xdebug issue has been addressed, but am still confused. Using php v7.3 and Xdebug v3.0.4, I'm having a problem with a plugin that doesn't seem to be finding some Composer-managed dependencies in my Docker dev…
MikeiLL
  • 6,282
  • 5
  • 37
  • 68
1
vote
1 answer

Docker Cannot assign requested address

I think I'm pretty close (I hope) to having xdebug running in a docker container, aiming to connect via Visual Studio Code. I think that maybe I'm supposed to add a config to the /etc/hosts file in the container, directing an IP address to the url…
MikeiLL
  • 6,282
  • 5
  • 37
  • 68
1
vote
1 answer

PHP 8.0: How to apply xdebug.ini

I installed Xdebug 3.0 on CentOS, but I don't want to use it by modifying php.ini. I want to create a new xdebug.ini to load Xdebug. How can I do this? > php -v PHP 8.0.6 (cli) (built: May 26 2021 16:08:33) ( NTS ) Copyright (c) The PHP Group Zend…
WesleyAlex
  • 15
  • 2
1
vote
2 answers

Setup XDebug 3 In WordPress Dev Env (Docker + WSL 2)

I can't make the step debugging work with XDebug 3 on WP Dev Env inside Docker + WSL 2 Here is my folder structure Ignore the references.txt file, it has no use here. The wordpress folder will contain all wordpress files. It is an empty folder at…
Jplus2
  • 2,216
  • 2
  • 28
  • 49
1
vote
0 answers

XDebug broken pipe warning - PhpStorm or Docker closing connection?

Environment I'm using Windows 10 Docker Desktop 3 for Windows With a container with the environment variable PHP_IDE_CONFIG=serverName=Docker XDebug 3 PhpStorm 2021.1.2 With an entry in Settings > PHP > Servers called "Docker" With these…
Phantom Watson
  • 2,667
  • 4
  • 25
  • 39
1
vote
1 answer

XDebug only writes to log for CLI scripts and not browser requests

I'm trying to diagnose why PhpStorm seems to lose its connection after a while to XDebug 3 running in a Docker container on Windows, so I have xdebug.log=/path/to/xdebug.log in a .ini file and I'm looking at that log file. XDebug successfully does…
Phantom Watson
  • 2,667
  • 4
  • 25
  • 39
1
vote
1 answer

Xdebug initiates connections with the client on no error

I'm experiencing an issue I'm not sure is an issue or intended. xdebug.mode=debug xdebug.start_upon_error=yes There is no (uncaught) error or exception in the script, but the connection is initiated serveral times during the request handling. This…
dakujem
  • 170
  • 2
  • 7