php-debug | Atom Text Editor package for PHP | Code Inspection library
kandi X-RAY | php-debug Summary
kandi X-RAY | php-debug Summary
Debug PHP code using the Xdebug PHP Extension.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of php-debug
php-debug Key Features
php-debug Examples and Code Snippets
Community Discussions
Trending Discussions on php-debug
QUESTION
I want to configure VS Code Xdebug plugin to work with Xdebug inside a WordPress Docker container.
I have an issue with the ports.
If I specify on the WP-with-Xdebug container in the "ports" section of the docker-compose.yml file:
...ANSWER
Answered 2021-Apr-23 at 11:45I think that both the WP container with Xdebug in it and the VS Code plugin want to use the same port on the host 9009
Yes, that nails it on the head. It is Xdebug that makes the connection, so there is no reason to expose the 9000/9009 port on the WordPress containers as that is for incoming connections. You can remove that expose line.
QUESTION
Goal
Debug with PHP Debug, Xdebug and VSCodium.
Problem
VSCode doesn't start debugging. When I click Start Debugging
the blue line under the debugging control buttons appears and moves for a few seconds and then the control buttons disappear. Same when I press the green "Run" button
Also on the left side, where "variables", "watch" and "stack" are shown nothing appears.
Description
I have no experience with the VSCodium debugging options. I used a couple of tutorials (1, 2, 3, videos and tried certainly the proposal from the VSCode PHP Debug extension site (which I use).
I'm using Codium (VSCode without MS) on a Linux Mint 20 machine. PHP 7.4 and Xdebug are installed via Linux Synaptic Package Manager. Of course the Xdebug helper in Firefox is enabled, breakpoints are set and I tried it in different projects. I tried a few things in the php.ini
. That's how it looks at the moment:
ANSWER
Answered 2020-Dec-22 at 09:32Finally found the solution. Its a Codium specific bug. At VSCode it works. Found the solution here: https://github.com/VSCodium/vscodium/issues/466
make sure you don't have PHP Debug extension installed;
go to https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug and download vsix file using "Resources" → "Download Extension";
in VSCodium go to "Extensions" sidebar and then click three dots icon near to "Extensions" title;
choose "Install from VSIX…" and select downloaded file.
@LazyOne thanks for your help again :)
Edit:
If you are updated to Xdebug 3.* you have to modify the xdebug section in the php.ini
:
Add this:
QUESTION
Expected behavior:
I have multiple PHP projects on different servers, usually I debug them with PhpStorm which allows me to configure path mappings for remote debugging per server. Thus I can have the same remote paths e.g. /var/www/html
for different servers.
Problem description:
So far I have been unable to configure multiple servers with the same remote paths using VSCode.
I use the most used php-debug plugin for VSCode and have not found any information regarding this issue on the projects GitHub page or anywhere else.
Currently I do not think configuring multiple remote servers using VSCode is possible at this time but in case someone knows a way I would appreciate it.
Current configuration:
With the following configuration I can only debug one project at once and have to change the paths manually when I want to debug another project on another server with the same remote paths.
...ANSWER
Answered 2020-Jul-11 at 21:20Step 1
To debug multiple websites with VSCode first add multiple configurations to the vscode-php-debug extensions config (Run->Open Configurations) with different names.
QUESTION
I've tried many things trying to let work Xdebug in a Docker container. I came in contact with these resources:
- Setting up Xdebug with Docker Compose and WordPress image
- Installing XDebug in Docker
- Starting The Debugger
- Zero-configuration Web Application Debugging with Xdebug and PhpStorm
- Xdebug & Zend Debugger bookmarklets generator for PhpStorm
- Configure Xdebug
- Troubleshooting common PHP debugging issues
- .. and other
I think the problem is either something with the ports that I don't understand, or it is something with the debugger session not being started or recognized. For the debugger session I have also tried to install a browser extension that sets a cookie.
I ended up at least to have separate containers, one as dev container with enabled Xdebug.
docker-compose.yml
...ANSWER
Answered 2020-Jun-20 at 17:50After booting up my machine to investigate further with the comments of @abestrad and @LazyOne, without changing anything, opening localhost:8080 suddenly let the debugging work by stoping at the breakpoint that i have set. Actually I had already tried to restart the Docker Desktop App before writing the question, maybe at that point my configurations were at a wrong state.
But at the end the solution was: Restarting the PC.
Watch out
To be sure i tried to open it also in a private browser session and it wasn't working anymore. That was because the special cookie still was set in the normal browser store (cookie that was stored either from the Browser extension that I have already uninstalled, or from trying out the JetBrains Bookmarklets generator before writing the question).
The solution to let it work everytime was to add following:
QUESTION
I have move from my Thinkpad laptop to HP Elitebook. I must set my development environment in my new laptop. After setup my Visual Studio Code and XAMPP in Windows 10 Pro 64 bit edition, I can't debug my PHP code.
I have properly installed Xdebug extension for Visual Studio Code, and make sure the php.ini correct. This is my setting for php.ini
(I use portable XAMPP which is placed on E:
drive):
ANSWER
Answered 2018-Dec-03 at 03:04The reason might caused by the port of php xdebug.It works for me fine when I did this:
1.use php --ini
to show php config file and change xdebug port to 9900:
xdebug.remote_port=9900
then restart your php
2.open vscode and change the port to the same number in launch.json:
"port": 9900
3.enjoy your debug
QUESTION
My php-debugging with xdebug in visual studio only works sometimes. Some of the times i just get a normal browser page load (error log below).
Edit: At first i thought it was due to the location of the file, but I noticed it could happen in any location; either xdebug finds an error in the code without stopping at my own breakpoints; or it can find all types of breakpoints OR find nothing at all... Now I'm thinking it has to do with refreshing, modifying and resaving the file as well as what types of errors are in the file. I'll get back to this if I can find out what causes it.
In my current setup I have my localhost webroot at /home/user/Git/www/projects
which is where 127.0.0.1
points to. However, I've also set up multiple virtual hosts that reside in their respective subfolders: /home/user/Git/www/projects/project_name
.
Some things I already looked at
In this thread: Visual Studio Code - Xdebug won't work - They suggest setting xdebug.remote_connect_back = 1
, which doesn't solve the problem. They also suggest setting localSourceRoot in launch.json to point to server root. However, simply adding "localSourceRoot": "http://127.0.0.1"
or something like "localSourceRoot": "http://127.0.0.1/project_name"
did not work.
Logs
/etc/hosts
...ANSWER
Answered 2017-Sep-03 at 14:18I finally realized that the problem was related to mountpoints. The project in VScode was opened on the path where the webserver was mounted; not where it was originally pointing to in apache. So the breakpoints were considered added to another file as the path was not the same.
QUESTION
So, I'm trying to get the vscode-firefox-debug to play.
It, vscode-firefox-debug
, claims to be compatible with vscode remote
.
How do I configure this thing, to work with my remote?
All my development is done on a remote headless server, running Slackware64 14.2
Let's call that box www.example.com
.
My local box is a Windows 8.1 x64 Pro
with:
Firefox 69.0.1 (64-bit)
ANSWER
Answered 2020-Feb-21 at 16:59Follow the link to help you:
https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug
Example to run on server to start manually xdebug while debug by SSH the file on local VS code IDE is:
QUESTION
I have visual studio code 1.41.1 installed with PHP Debug Version - 1.13.0.
https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug
I am running PHP Lamp stack on Ubuntu, my PHP info is showing “xdebug xdebug support enabled - Version 2.9.0”
My PHP.ini is configured as follows:
...ANSWER
Answered 2020-Jan-08 at 14:01It looks like something else is already listening on port 9000, and hence, VS can't open the same port for listening as well. It is likely that this is PHP-FPM.
To work around this, set the following instead in php.ini:
QUESTION
I'm trying to get xdebug to talk to PHPStorm from inside a docker container.
My .ini file currently looks like this, but believe me: I've experimented with many combinations of these settings this morning:
...ANSWER
Answered 2020-Jan-29 at 10:52I hope it's help you:
docker-compose.yml
QUESTION
Using PrestaShop 1.7 to develop my application and using Xdebug to debug my code. The Xdebug doc link is https://xdebug.org/docs/.
But it will get exception every time which says that
"Integrity check failed."
debug script is
...ANSWER
Answered 2019-Nov-08 at 06:07I solved issue by ignoring vendor folder.I am not sure this is the right way. Changed debug script is
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install php-debug
With these settings, PHP will connect to your editor for every script it executes. The alternative is to switch xdebug.remote_autostart to false, and install an Xdebug helper extension for your browser of choice, such as:. These browser extensions will give you a button within your browser to enable/disable Xdebug. The extensions might have configuration options for an "IDE key" (which is used for an XDEBUG_SESSION cookie). The IDE key for Atom with PHP Debug is "xdebug-atom".
The easiest Xdebug for Mozilla Firefox
Xdebug Helper for Google Chrome
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page