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
0 answers

Debug in Docker: Connection was not established. Probably 'xdebug.remote_host=host.docker.internal'

I've read countless articles, including this which sounded almost exactly like my setup/issue: Xdebug inside Docker on Mac M1 2021 is not working I'm getting the error message mentioned in the title, still. Here is how I spin up the container (which…
Alex.Barylski
  • 2,843
  • 4
  • 45
  • 68
0
votes
1 answer

Xdebug PHP. What are the optimal settings? Mine is dead slow

It's an old-age question. Am crawling at this point. It's year 2023, and yes, I have read tons of post here and elsewhere on the internet pertaining to this issue. It's important I use Xdebug for development. It's really concerning since a job that…
John Miller
  • 527
  • 4
  • 15
0
votes
1 answer

How do I choose between thread-safe and not thread-safe PHP?

I am developing a Laravel 9.x app in Windows 10. My current version of PHP is PHP 8.1.5 (cli) (built: Apr 12 2022 17:38:57) (ZTS Visual C++ 2019 x64). Is this a thread-safe or not-thread-safe version? How can I tell? When should I prefer a…
Henry
  • 1,395
  • 1
  • 12
  • 31
0
votes
1 answer

How to trigger only the profiler on Xdebug with no config change

Xdebug is working with my containers. I can use the debugger to step through the code. I have the following settings in…
AntonioCS
  • 8,335
  • 18
  • 63
  • 92
0
votes
1 answer

VSCode is not able to connect to Xdebug

I tried to setup the Xdebug step debugger in my docker container to be able to connect to my Docker container. This is my configuration snippet from the launch.json in the .vscode directory in my project: { "name": "Xdebug", "type": "php", …
L00tz1ffer
  • 37
  • 6
0
votes
1 answer

Xdebug 3 with Laravel Valet and PHP 8.1 is not working

I'm running PHP 8.1 with Xdebug 3 installed. And I have installed Laravel Valet. I've tried so many things to make Xdebug work. I want to run it on port 9003 but unfortunately couldn't. My php.ini Xdebug settings are (as you can see the commented…
0
votes
0 answers

Segmentation fault ../string/strstr.c: No such file or directory

I'm getting a segmentation fault running a script using a custom PHP 8.1.9 compiled with phpbrew tool. I've executed gdb and trying to debug the segmentation fault but I'm not sure of the next step I should take. Here's the…
gabtzi
  • 573
  • 3
  • 8
  • 24
0
votes
1 answer

Configure Xdebug in Docker container

I'm trying to create a docker container with PHP and Xdebug to use step debugging. I use VSCode and somehow this debugger it's not working. Apparently the Dockerfile is not been executed when I use docker compose up -d command. I assume that is…
0
votes
1 answer

How to fix docker-php-ext-enable: not found when Dockerfile is FROM debian:10?

I want to upgrade to xdebug 3, currently there is installed xdebug 2. The Dockerfile stars with FROM debian:10 I have added line RUN pecl install xdebug && docker-php-ext-enable xdebug and I get error when building: Installing…
Darius.V
  • 737
  • 1
  • 13
  • 29
0
votes
0 answers

Why won't Xdebug 3 stop on PhpStorm breakpoints?

I've been using Xdebug and PhpStorm successfully for years. Now I've reinstalled on a new dev machine, it no longer works. My setup is: Wamp64 server Xdebug 3.1.1 phpinfo() reports: xdebug Support Xdebug on Patreon, GitHub, or as a business:…
charliefortune
  • 3,072
  • 5
  • 28
  • 48
0
votes
0 answers

Setting Xdebug via WSL2 without an Ethernet cable

I have installed Docker on WSL2 machine (Ubuntu-18). PhpStorm installed on Windows machine. I previously had Xdebug configured. And everything worked fine while the Internet was via an Ethernet cable. But now that I don't have an Ethernet cable, my…
sveta600
  • 439
  • 4
  • 8
0
votes
1 answer

How to use Xdebug function with PhpStorm?

I have Xdebug setup with PhpStorm. I would like to be able to use some of the Xdebug functions, specially xdebug_notify(). That function sends information to the debugging client. However, I don't see it anywhere in the debug window in PhpStorm. How…
NealM
  • 58
  • 7
0
votes
1 answer

Xdebug 3 in Docker container: Could not connect to debugging client. - Address not available

In my Docker container xdebug say: Could not connect to debugging client. Here is my dockerfile: FROM php:8.1-fpm-alpine WORKDIR /var/www/html RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/…
netdjw
  • 5,419
  • 21
  • 88
  • 162
0
votes
1 answer

How to limit error display to certain users or IPs

Currently when there is a notice or warning, it is displayed on our web pages. We would like this to be available only to some IPs or other criteria for our developers Is there a way to render the error log stack only to certain IP? Thanks
MastaP
  • 109
  • 4
0
votes
0 answers

How can we print the visited URL to error_log

We would like the error-log to include the URL (uri) of the original page called by the visitor. A user visits a web page (URL). The page is generated by multiple PHP scripts One of the scripts triggers an error In the logs, I see the script name…
MastaP
  • 109
  • 4