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
0
votes
1 answer

Exception breakpoints with PhpStorm Xdebug & docker

I am working on WSL2 with PhpStorm, Docker and Xdebug 3. My line breakpoints are working fine but exception breakpoints don't trigger any break. I have no idea why this fails. Is any additional configuration required compared to line breakpoints?
curuba
  • 527
  • 1
  • 10
  • 29
0
votes
1 answer

Why Xdebug 3 profiler triggers in CLI but not in Apache?

I can trigger a PHP debug session (for both CLI and Apache) but when trying to profile it is working ONLY when in CLI mode and not under Apache2. Here is my Xdebug configuration…
Alex
  • 5,510
  • 8
  • 35
  • 54
0
votes
3 answers

Xdebug inside Colima docker container doesn't connect to PhpStorm debugger on Mac

I am trying to use Colima to run an apache-php docker container. My uni provides docker images derived from upstream ones configured for our course using docker-compose. The container works as it should but I can't get its Xdebug to connect to my…
Atemu
  • 295
  • 3
  • 12
0
votes
1 answer

Debugging PHP, NetBeans not working with xdebug v3

Debugging PHP, NetBeans not working with xdebug v3 I'm using ubuntu 18 PHP7.4 Xdebug v3.1.2 php-v PHP 7.4.28 (cli) (built: Feb 17 2022 16:06:19) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend…
Ahmad Halah
  • 81
  • 1
  • 5
0
votes
0 answers

Xdebug stops working after "valet secure"

I have a problem related to Laravel Valet and Xdebug. The Xdebug stops working after valet secure command. The Xdebug was installed through PECL with Homebrew and works fine with unsecured sites. After running valet secure the Xdebug stops working…
0
votes
0 answers

M1 - PHP Warning: Failed loading Zend extension 'xdebug'

I want to install Xdebug in my local environment, I have followed Xdebug wizard, but after installation by command php -v I a got warning from above. I have tried to install arch -x86_64 sudo pecl install xdebug, not working. which php ->…
Milos N.
  • 4,416
  • 6
  • 18
  • 31
0
votes
1 answer

How to truncate long arguments in stack trace?

I'm trying to control Xdebug's output when memory is exhausted. I find that if a very long string is passed to a function (and then memory is subsequently exhausted) Xdebug dumps the entire parameter in the stack trace without truncation. Some…
Tim
  • 8,036
  • 2
  • 36
  • 52
0
votes
0 answers

Issues getting Xdebug 3 to work with VSCode

I have a Vagrant setup for working with bespoke PHP projects, based on Ubuntu 20.10 (Groovy Gorilla) which I use as a base to develop PHP projects. I realized that that version of Ubuntu is out of support, so I updated to hirsute (21.04) (since it…
JoSSte
  • 2,953
  • 6
  • 34
  • 54
0
votes
0 answers

Xdebug not working on Mac (using PhpStorm)

I've recently had to swap over to a MacOS for development. Previously I had Xdebug running fine and it's such a massive help that I want to use is again. I followed the Mac/homebrew instructions here: https://xdebug.org/docs/install#pecl with some…
Skytiger
  • 1,745
  • 4
  • 26
  • 53
0
votes
1 answer

vagrant + xdebug + vscode

OS X version 12.1 Vagrant version 2.2.19 vagrant machine has ubuntu 16.04 php 7.4 xdebug v3.0.2 nginx server I changed the configuration of xdebug.ini to: date.timezone = "Europe/Berlin" short_open_tag =…
Toqa Abbas
  • 11
  • 3
0
votes
2 answers

Xdebug ignoring XDEBUG_CONFIG set in docker-compose.yml

I have a docker-compose file that has the XDEBUG_CONFIG environment variable configured, but Xdebug is ignoring it. When I output xdebug_info(); it says "no value" for xdebug.idekey. XDEBUG_MODE is being read correctly though. If I set the idekey in…
Josh
  • 714
  • 2
  • 8
  • 20
0
votes
3 answers

Xdebug for docker not connecting

I am working on setting up Xdebug on Docker using this course- https://github.com/markshust/docker-magento The site is up and running fine but Xdebug will not work. On the Chrome browser I have this setup- It is enabled here- Here are what my…
tjjen
  • 127
  • 8
0
votes
1 answer

PhpStorm can't use Xdebug on Docker container inside Vagrant box

I have configured Xdebug inside PHP container which is run by Docker inside Vagrant. What's the best way to get Xdebug working in PhpStorm, so how to expose docker container debugger info (port 9003) to establish connection with PhpStorm on enabled…
WesleyAlex
  • 15
  • 2
0
votes
0 answers

Xdebug 3.1.1 doesn't show variables except $_COOKIE, $_GET, $_REQUEST, $_SERVER

I use PHP 7.4.26 with Xdebug 3.1.1, Apache/2.4.41 (Ubuntu) and PhpStorm as a client. In the xdebug log file I see that any variable I use in my PHP script come as 'uninitialized' So whatever my script contains I receive only 4 variables $_COOKIE,…
Adam Mason
  • 45
  • 8
0
votes
1 answer

Cannot load xdebug in PHP 8.0

In Windows 10 with PHP 8.0.2, attempts to load 3 different versions of xdebug all fail with Failed loading Zend extension 'php_xdebug-... Versions…
geoB
  • 4,578
  • 5
  • 37
  • 70