12/6/2023 0 Comments Postman xdebug phpstorm![]() Using this tutorial I was able to incorporate the above command line into PHPStorm, so now I can actually run the code using phpstorm command line tools. Using the web app configuration doesn't work for this one. However I'm trying to actually set breakpoints for my mobile app (the mobile app sends http calls to the backend app which is a symfony app). This works just fine if I set up breakpoints for browsing the site itself or testing api calls from a browser based rest client like postman However for that to work I need to first run this command on the shell: php app/console server:run -env=dev Then set a breakboint in the index.php file and load page from browser.I was able to set up a php web app debugger in PHPStorm by simply tying it to my localhost at a specific port and everything works fine. If your index.php is located under /home/lanoxx/project/index.php enter the same location under "Absolute path on the server". The next one sounds stupid but worked for me. Now check the "Use path mappings" and scroll down to your index.php or some other uniqe entry point you can reach from the browser. mydomain.local if existing and enter mydomain.local as host name, with port 80 and XDEBUG. In there select the server you set up e.g. To do this go to Settings -> Languages & Frameworks -> PHP -> Server. Or export those setting when debugging from command line.įor xdebug.ini xdebug.remote_host=mydomain.local įor command line usage: export PHP_IDE_CONFIG=serverName=mydomain.local php -dxdebug.remote_autostart=1 -dxdebug.remote_connect_back=1 -dxdebug.remote_host=mydomain.local. What helped me was adding the remote host name/ip to the xdebug, when debugging for browser call. It will do it's work but don't stop on break points because it thinks it's not needed for the current request. But first you questions:Īnswer: I don't know exactly but I suspect based on that it works when you explicitly specify ?XDEBUG_SESSION_START=PHPSTORM or "break on first line", it is ignoring the incoming request. I had the same problem in PHPStorm 9 while debugging code inside a virtual machine. I think it was automatically installed with php. I am not quite sure why its installed or if I need it. ![]() I have a php extension installed that is called fpm. ![]() With Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick RethansĪnd my Apache virtual host configuration: Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies Update: Added my PHP and XDebug version output from php -v: PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS ) Question: Why is the XDEBUG_SESSION cookie being ignored? Now if I explicitly use a URL with the following query parameter appended: ?XDEBUG_SESSION_START=PHPSTORM then all my breakpoints are properly being breaked in IntelliJ. 'mydomain.local' server at PHP|Servers or enable Break at first line in To figure out the problem check path mappings configuration for It may be caused by path mappings misconfiguration or not synchronized The warning that I see looks like this: Debug session was finished without being paused If I disable that option, I get a warning that no breakpoint was hit, even though I have a break point set and I am certain that the code is being executed. If I enable Break at first line in PHP scripts, then the debugger immediately breaks at the first breakable location inside the index.php. In IntelliJ I have setup a Server pointing to mydomain.local and in the run configuration I am using that server and have set the Ide Key to PHPSTORM. I have configured php with the xdebug plugin using the following settings: xdebug.extended_info = 1 In the Developer Tools under Cookies I can see that the XDEBUG_SESSION cookie is set to PHPSTORM. I am trying to debug a Drupal website with the PHP plugin in Intellij (would be the same in PhpStorm).Ĭhrome Browser pointing to a localhost alias mydomain.local and the XDebug Helper extension is installed and set to Debug.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |