PhpStorm and Xdebug not working - phpstorm

SOLVED
All day long I have tried different methods and techniques to make xdebug working. I have installed the plugin into Chrome, I've made the bookmarks for creating cookies...
The validator seems alright but when I try refreshing Chrome with breakpoints nothing happens. It's like the connection is not made, skipping my breakpoints.
I'm trying to made it work with PHP 5.6
I am using MAMP and the latest PhpStorm 2018.1
My server :
My phpinfo() xdebug category :
My php.ini
XDEBUG LOG :
To solve this issue i've place an absolute path on my server
Thanks.

What worked for me: I opened Workspace.xml in my .idea-folder and removed everything that had to do with xdebug.

Related

Xdebug from Docker suddenly stopped working in PhpStorm

I have used this for a long time without any issue, it was still working yesterday. I don't know what happened, maybe a silent update of PhpStorm or whatever - but it stopped working.
I checked with a local script, Xdebug still activates. I also used PhpStorm validation - no problem :
Now, when I load a page of the project, after activating the bookmarklet, it doesn't trigger anything. Also, I used to be able to launch scripts from the command line inside docker this way :
export PHP_IDE_CONFIG="serverName=localhost"
php -dxdebug.remote_enable=On -dxdebug.remote_autostart=On -dxdebug.remote_connect_back=On -dxdebug.idekey=PHPSTORM -dxdebug.remote_port=9000 -dxdebremote_host=localhost myscript.php
I tried checking all debug relevant stuff in config :
Nothing goes. I'm pretty stuck here. Thanks ahead for any help.
PhpStorm Version - 2020.3
Xdebug 2.2.5
PhpStorm 2020.3
That's an issue in PhpStorm 2020.3. It is already fixed (WI-57282) for next minor 2020.3.1 version.
As I understand you are using some old PHP version (5.6 or alike) and cannot upgrade it to use newer PHP/latest Xdebug.
For the moment you either have to rollback to 2020.2.4 or wait for 2020.3.1 release (2020.3.1 Preview build is already available; final version should be released at some point later this month).

silverstripe 4 server error after removing module

I'm having problems with using fluent in Silverstripe 4. So I tested to install different versions of fluent to see if I was able to get it working. The version of Silverstripe is 4.1.1.
After uninstalling fluent again, I get "server error" and I can't see anything in the php logs and when trying to run in dev mode, I don't see any difference.
One puzzling thing is that a folder named "themes" appeared in the root folder. I think that it was added by composer during the module installation, but I'm not sure. But I do know that git listed the themes folder as an untracked file. Which suggests that it was automatically added. So I removed that folder when uninstalling the module.
Now I'm not sure what to do. I would want to restore the database as it was before installing fluent (I've tried to add language to see if fluent was working). Or at least get back to square one.
How do people usually do when working with Silverstripe and testing modules?
What I've done so far:
Checked the php logs. No errors found.
Added "Director::set_environment_type("dev");" to _config.php, without seeing any difference when loading the page.
Tested to load the page with ?dev=1 without any difference.
I ran composer update and now the site is working. Might be one thing to test for silverstripe noobs (like me).

PhpStorm & Xdebug - cant get to work debugger with CLI script

This is my first post here, I post because after reading through X articles googling can't get PhpStorm, Xdebug work with CLI scripts.
Already tried to follow advices from:
PHPStorm + XDebug Setup Walkthrough
https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm
PHPStorm + XDebug + Vagrant
and few blogs that I've found online, but still nothing...
I had it working, but after destroy vagrant recently and now can't fully restore this feature.
SETUP:
I'm running Symfony project on Vagrant.
Debugging of "webpages" on my server works just perfectly.
When I try debug CLI Command I prequisite it with:
export XDEBUG_CONFIG="XDEBUG_SESSION=1"
export PHP_IDE_CONFIG="serverName=vagrant"
XDEBUG.INI (on Vagrant):
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=192.168.0.133 (ip I get from ifconfig -a on Vagrant)
xdebug.remote_port=9000
xdebug.max_nesting_level=2500
xdebug.remote_handler=dbgp
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.idekey="PHPSTORM"
Any help much appreciated. Digged through X articles on web but in my eyes all configurations look ok, no idea what to do...
Set xdebug.remote_connect_back to be 0.
This option prevents you from using right IP address when you are doing Remote CLI debugging. Since it's a CLI debug, the IP will always be local (vagrant machine) while you need another one.
This option works OK when debugging over browser as request comes from your "real" computer. But when doing CLI debug .. request will be local to Vagrant machine.
When this option is set to 1 (as it is done now) it ignores the setting from #2 below.
xdebug.remote_host=192.168.0.133 (ip I get from ifconfig -a on Vagrant) -- this should be an IP of your computer where PhpStorm is running as seen from Vagrant machine.
Combination of those 2 above will do the job for you.

PhpStorm + XDebug + Symfony not working

I am beginner with XDebug, even with PhpStorm and Symfony in general.
I am trying to run XDebug now, but I am not able to get it triggered from PhpStorm.
I have come through some basic setting pages, like this one
You can check some of my local settings:
NGinx
etc/hosts
Thanks to #LazyOne I have found the solution.
His advice was right: "Upgrade your xdebug -- 2.5.0RC1 has issues on Windows -- use 2.5.0 final"
Even after upgrading xdebug, I was still having problems, but that was caused by some leftover settings that I tried in an effort to get it working.
Especially this setting "xdebug.remote_mode = jit" was stopping me from having Xdebug stop at my predefined breakpoint. After removing it, it was easy and I can now see, that tutorials are really right.
I shouldn't use RC releases next time, to save hassles.

PhpStorm crashes on startup

I installed PhpStorm on my machine (Windows XP) at work. At first it was fine and I used it for a day or so. After the installation of (likely) an incompatible plugin, the IDE freezes on startup.
I already tried reinstalling and updating Java. I even cleared the registry of any JetBrains and PhpStorm entries and installed it again.
I've searched the JetBrains forums, but it seems the problem I have is not a common one.
Maybe one of you had the same issue?
Any hints would be much appreciated.
Try to delete application plug-ins/caches. If it doesn't help, also delete settings. See the FAQ for the directories locations on your system.
Most likely idea.log contains the exceptions from the plug-in which causes this problem. I'd recommend sending this log to the plug-in vendor.
I had a similar issue and followed #CrazyCoder's instructions (thank you!), but the error turned out to be with related to indexing.
I reopened the IDE, and hurried to File > Invalidate Caches / Restart ...
Had a different issue (Ubuntu 20.x)
My use case :
I launched phpstorm and hit "cancel" while it was automatically reloading my last project (which closed PS immediately)
Then, trying to launch it just did show the splash screen for some seconds... and nothing. (tried it several times).
It turned out the process were still somewhere, while no GUI was visible.
ps aux | grep phpstorm had several (many) results.
All those zombie processes moaning "JetBraiiiiiiins" was a quite terrifying sight to me
Solution ? Kill'em all !
pkill -f phpstorm
I met similar issue while starting my PhpStorm 7.
Then I followed CrazyCoder's instructions to delete a new-installed plug-in at ~/Library/Application Support/WebIde70 (using Mac) and it finally works...
C:\Users\username.PhpStorm2016.1\system\LocalHistory
On Linux, when running pstorm from the terminal, it may complain about:
/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/user/.local/share/JetBrains/Toolbox/apps/PhpStorm/ch-0/201.7846.90/jbr/lib/libjfxmedia.so)
Which can be fixed by adding this into ~/.bashrc:
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64