1

I'm using PHPStorm and Xdebug. I'm trying to debug a Web Application Project configured in my localhost. There are no symbolic links in my project path.

Below is Xdebug configuration in my php.ini:

[Xdebug] xdebug.remote_port=9000 xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.profiler_enable=1 xdebug.remote_host=localhost xdebug.remote_handler=dbgp xdebug.idekey = "PHPSTORM" xdebug.profiler_output_dir="/tmp" xdebug.remote_log="/tmp/xdebug.log" zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so 

Below are two variables exported in my zsh:

export PHP_IDE_CONFIG="serverName=localhost" export XDEBUG_CONFIG="idekey=PHPSTORM" 

Below is server configuration: Below is server configuration

Below is debug configuration: Below is debug configuration

Below is the screenshot of first breakpoint where I see no variable values. enter image description here

Below is the screenshot after 'Step In'. It shows: Waiting for incoming connection with ide key 'PHPSTORM'. It shows: Waiting for incoming connection with ide key 'PHPSTORM'

I get below message in event log:

Debug session was finished without being paused. It may be caused by path mappings misconfiguration or not synchronized local and remote projects. To figure out the problem check path mappings configuration for 'dev.sales-crm.com' server at PHP|Servers or enable Break at first line in PHP scripts option (from Run menu). 

My problem is: after debugging is started, then control stops at first breakpoint. It shows no variables values. Then If I try to 'step into', then debugging stops.

Please help me. Below is the link to xdebug logs: xdebug.log

8
  • 1) export PHP_IDE_CONFIG="serverName=localhost" export XDEBUG_CONFIG="idekey=PHPSTORM" -- you do not this for browser based debug. 2) The issue must be with with path mappings (even though you seems to have your IDE running on the same machine where code is executed (not VM or remote server of any kind). You have to keep in mind -- xdebug works with final/resolved paths .. while IDE uses them as is. So .. if you have symlink somewhere in the path ... it will not work (as xdebug uses one path and IDE another one). Commented Dec 7, 2016 at 10:19
  • So ... 3) show me the full path to the file that you are trying to debug (as IDE sees it) 4) collect xdebug log and share it -- xdebug.org/docs/all_settings#remote_log Commented Dec 7, 2016 at 10:20
  • @LazyOne: I'm not using any symbolic link in my project. This is link of my xdebug log: pastebin.com/MMNhRCds Commented Dec 7, 2016 at 10:47
  • Well ... I see that it stops in /Users/abhijeet/Projects/sales-crm/public/index.php .. but all other breakpoints are in other files (e.g. /Users/abhijeet/Projects/sales-crm/app/Api.php). So far (the whole behaviour) it looks indeed as incorrect path mappings of some kind (cannot be more specific). Go into Preferences .. find xdebug settings and disable "Force break at first line" options and try debugging again. Will it break at all now? I suggest to show more screenshots .. maybe even some screencast -- maybe it will show some missing bit. Commented Dec 7, 2016 at 10:54
  • 1
    Other than that -- try PHP 7.0 and xdebug 2.4.1 -- the latest 2.5RC might have some issues (if it's on xdebug side, of course) Commented Dec 7, 2016 at 10:55

1 Answer 1

2

I upgraded my Xdebug version form Xdebug 2.5.0rc1 to Xdebug v2.5.0 and it started working.

Thank you very much.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.