The problem
So I feel although I’ve tried everything and still can’t get xdebug to connect to phpstorm. I says it waiting for a connection, then when I load the page, using either the get variable ?XDEBUG_SESSION_START=PHPSTORM
or the chrome extension, the message briefly changes to connected
, before going back to waiting.
The error:
In the error log at E:xamppapachelogsxdebug.log
is as follows
Log opened at 2016-03-29 16:35:40
I: Connecting to configured address/port: 12hitchinscouts.local:9001.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///E:/Users/Roshan/PhpstormProjects/12hitchinscouts.org.uk/index.php" language="PHP" protocol_version="1.0" appid="4396" idekey="PHPSTORM"><engine version="2.2.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2014 by Derick Rethans]]></copyright></init>
<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
<- feature_set -i 2 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
<- feature_set -i 3 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>
<- status -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="4" status="starting" reason="ok"></response>
<- step_into -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="5" status="stopping" reason="ok"></response>
<- breakpoint_set -i 6 -t line -f file://E:/Users/Roshan/PhpstormProjects/12hitchinscouts.org.uk/index.php -n 8
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6"><error code="5"><message><![CDATA[command is not available]]></message></error></response>
Log closed at 2016-03-29 16:35:41
My current config
I’m using Apache 2.4 on Windows 7 Pro with xampp and php5.6
php.ini
[XDebug]
zend_extension = "E:xamppphpextphp_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "E:xampptmpxdebug"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.idekey = PHPSTORM
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "12hitchinscouts.local"
xdebug.remote_port= 9001
xdebug.remote_log= "E:xamppapachelogsxdebug.log"
xdebug.trace_output_dir = "E:xampptmpxdebug"
xdebug.extended_info = 1
phpinfo
PHPStorm
What I’ve tried
- Using break-points in PHPStorm
- Using
xdebug_break();
in PHPStorm - Setting remote host to this
xdebug.remote_host = "127.0.0.1"
in php.ini - Various tutorials and forum posts to get me to this point
If you need any more info then feel free to ask, but I think I’ve provided it all.
Thanks
Whooo, you reached the bottom π
Edit
Here’s my php file:
<?php
//set page title
$title = "Welcome";
//for Facebook and twitter
$metaTitle = 'Looking to join Scouting or find out about our group?'; //title for post
$metaImage = 'http://12hitchinscouts.org.uk/images/FB-img.JPG'; //image url for post
$metaDesc = 'This is the official website for the 12th Hitchin scout group. Here you can find out about our different sections; when and where they meet as well as what they'll be doing next. This group consists of beavers cubs and scouts sections.'; //description to appear on post
$headMeta = '<!--for extra google results page features and SEO-->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"url": "https://12hitchinscouts.org.uk/",
"logo": "http://12hitchinscouts.org.uk/images/12th-Logo.png",
"name" : "12th Hitchin Scouts",
"sameAs" : [ "http://www.facebook.com/groups/12hitchinscouts/",
"http://www.twitter.com/12thhs" ],
"potentialAction": {
"@type": "SearchAction",
"target": "https://12hitchinscouts.org.uk/search#stq={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<meta name="Description" content="This is the homepage for the 12th Hitchin scouts, from here you can find out what's going on and see upcoming activities for each section of our Hitchin scout group. Hitchin is our home too, and that's why we are commited to helping our local area aswell as other usual scouting activities.">'; //schema info for google
xdebug_break();
require("includes/head.php");
?>
<link href="css/index_response.css" rel="stylesheet" type="text/css">
<!--content-->
<div class="fluid Title"><h1>Welcome!</h1></div>
<br />
<div class="fluid twitter hide_mobile ">
<h2>Tweets
<span class="follow">
<a href="https://twitter.com/12thhs" target="_blank">
<img src="images/Twitter_logo.gif" />
Follow
</a>
</span>
</h2>
<br />
<span class="tweets">
<?php include_once("includes/twitter.php"); ?>
</span>
</div>
<div class="fluid what">
<h2>What is scouting?</h2>
<p>Scouts was invented in 1907 by Robert Baden-Powell with just 20 boys. Over
a century later the number is into millions worldwide. There are many
stories around scouting, which could take up this entire pack β but suffice to
say it has evolved over the last century in many different ways.
We aim to ensure that a balanced programme is achieved which allows the
children to grow mentally, physically, socially and spiritually. Scouts
nowadays still need to Be Prepared as the old motto goes, and we have
many activities that are fun, testing and hopefully, a little bit out of the
ordinary β offering something new and different to everyone. We have tried
many activities over the last few years ranging from Bowling and archery to
bouldering and kayaking. We have walked in the peak district camping
overnight, conversely, we have walked for a couple of hours around
Deaconβs hill in Hitchin.</p>
<p>All the scout basics are there, including hiking, camping, first aid and
numerous badges catering from hobbies and activities to in depth levelled
badges for swimming or aeronautics! We also aim to complete a Challenge
Badge every 1-2 terms, which when collected gains the Chief Scouts Gold
award β the highest accolade available as a Scout. To earn this, Scouts show
their creativity, outdoor skills, help the community, learn about faiths and
tolerance and ultimately β go on an expedition for a few days, planned and
carried out by themselves!</p>
<p>Joining the scouts will leave you in esteemed company as people such as
Kate Middleton, Major Tim Peake, David Beckham, Nelson Mandela, Barack Obama, Richard
Branson, Ross Kemp and our current Chief Scout Bear Grylls, have all been
involved in scouting.</p>
</div>
<div class="fluid index_events">
<h2>Upcoming events</h2>
<?php
$no = 1; //number of upcoming events to display, 0 or less shows 1. Non integers are rounded and values of 0 or less are turned to 1
$index = 1; //this is the index page, leave blank for implementation on other pages. uses if($index == 1) logic
$limit['years'] = 1;//how far into the future should it show events? Non integers are rounded and values of 0 or less are turned to 1
//This shows events from all sections, to specify a section, a line must be added the SQL queries
include("includes/upcoming_events.php");
?>
</div>
<div class="fluid galery">
<h2>Gallery</h2><p><a href="/gallery">Visit full gallery</a></p>
<?php require("includes/gallery_embed.php"); ?>
</div>
<!--end content-->
<?php require("includes/footer.php"); ?>
I know I spelt gallery
wrong, I just haven’t gotten around to fixing it yet π
Edit 2
xdebug log
Log opened at 2016-03-29 18:21:04
I: Connecting to configured address/port: 127.0.0.1:9001.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///E:/Users/Roshan/PhpstormProjects/12hitchinscouts.org.uk/index.php" language="PHP" protocol_version="1.0" appid="11672" idekey="PHPSTORM"><engine version="2.2.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2014 by Derick Rethans]]></copyright></init>
<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
<- feature_set -i 2 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
<- feature_set -i 3 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>
<- status -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="4" status="starting" reason="ok"></response>
<- step_into -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="5" status="stopping" reason="ok"></response>
<- breakpoint_set -i 6 -t line -f file://E:/Users/Roshan/PhpstormProjects/12hitchinscouts.org.uk/index.php -n 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6"><error code="5"><message><![CDATA[command is not available]]></message></error></response>
Log closed at 2016-03-29 18:21:05
PHPStorm log
It was too long to post pastebin
2
Answers
As stated by @LazyOne in the comments I needed to update my xdebug version to 2.3.2
LazyOne didn't post an answer so I'm doing it, if they do, I'll accept theirs.
Try with these settings, and download this dll file. It works fine for me: