Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xDebug stopped working all of a sudden, connection is made, but website doesn't load #344

Closed
DeBelserArne opened this issue Apr 6, 2019 · 0 comments

Comments

@DeBelserArne
Copy link

DeBelserArne commented Apr 6, 2019

PHP version:

PHP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jan 13 2019 10:19:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.1-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.0rc1, Copyright (c) 2002-2019, by Derick Rethans
    with blackfire v1.24.3~linux-x64-non_zts73, https://blackfire.io, by Blackfire

XDebug version:
2.6.1

Adapter version:
Do you mean the PHP Debug extension version, that one is= 1.13.0

Your launch.json:

{
			"name": "Listen for XDebug on Homestead",
			"type": "php",
			"request": "launch",
			"port": 9000,
			"pathMappings": {
				"/home/vagrant/code": "${workspaceFolder}"
			},
			"log": true,
		}

XDebug php.ini config:

zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=10.0.2.2
xdebug.remote_log=/tmp/xdebug.log

XDebug logfile (from setting xdebug.remote_log in php.ini):

Log opened at 2019-04-06 11:16:59
I: Connecting to configured address/port: 10.0.2.2:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/vagrant/code/public/index.php" language="PHP" xdebug:language_version="7.2.14-1+ubuntu18.04.1+deb.sury.org+1" protocol_version="1.0" appid="3502" idekey="vscode"><engine version="2.6.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2018 by Derick Rethans]]></copyright></init>

<- breakpoint_list -i 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"></response>

<- breakpoint_set -i 2 -t line -f file:///home/vagrant/code/app/Http/Controllers/PostController.php -n 37
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="35020001"></response>

<- breakpoint_set -i 3 -t line -f file:///home/vagrant/code/app/Http/Controllers/PostController.php -n 39
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="3" id="35020002"></response>

<- stop -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="4" status="stopped" reason="ok"></response>

Adapter logfile (from setting "log": true in launch.json):
I have set this setting, but I don't know where to findt his logfile
EDIT: I just found out this is under "Debug Console":

<- launchResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 2,
  command: 'launch',
  success: true }
new connection 1
new connection 2
<- threadEvent
ThreadEvent {
  seq: 0,
  type: 'event',
  event: 'thread',
  body: { reason: 'started', threadId: 2 } }
<- initializedEvent
InitializedEvent { seq: 0, type: 'event', event: 'initialized' }
-> setBreakpointsRequest
{ command: 'setBreakpoints',
  arguments:
   { source:
      { name: 'PostController.php',
        path:
         'c:\\Users\\aFluxx\\Desktop\\pigeome\\app\\Http\\Controllers\\PostController.php' },
     lines: [ 37, 39 ],
     breakpoints: [ { line: 37 }, { line: 39 } ],
     sourceModified: false },
  type: 'request',
  seq: 3 }
-> threadsRequest
{ command: 'threads', type: 'request', seq: 4 }
<- threadsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 4,
  command: 'threads',
  success: true,
  body:
   { threads:
      [ Thread { id: 1, name: 'Request 1 (1:42:47 PM)' },
        Thread { id: 2, name: 'Request 2 (1:42:48 PM)' } ] } }
new connection 3
<- threadEvent
ThreadEvent {
  seq: 0,
  type: 'event',
  event: 'thread',
  body: { reason: 'started', threadId: 3 } }
<- initializedEvent
InitializedEvent { seq: 0, type: 'event', event: 'initialized' }
-> setBreakpointsRequest
{ command: 'setBreakpoints',
  arguments:
   { source:
      { name: 'PostController.php',
        path:
         'c:\\Users\\aFluxx\\Desktop\\pigeome\\app\\Http\\Controllers\\PostController.php' },
     lines: [ 37, 39 ],
     breakpoints: [ { line: 37 }, { line: 39 } ],
     sourceModified: false },
  type: 'request',
  seq: 5 }
-> threadsRequest
{ command: 'threads', type: 'request', seq: 6 }
<- threadsResponse
Response {
  seq: 0,
  type: 'response',
  request_seq: 6,
  command: 'threads',
  success: true,
  body:
   { threads:
      [ Thread { id: 1, name: 'Request 1 (1:42:47 PM)' },
        Thread { id: 2, name: 'Request 2 (1:42:48 PM)' },
        Thread { id: 3, name: 'Request 3 (1:42:51 PM)' } ] } }

Code snippet to reproduce:

Any code, since it won't start.

xDebug used to work properly, and since today when I try to access my website with xDebug active I get two requests in the callstack:
https://i.gyazo.com/1e44c6b118bd2f6232fe7f589f1fb8d4.png

And my website hangs (gets stuck).

Any idea what could be causing this?

@DeBelserArne DeBelserArne changed the title xDebug started working, client can connect but website hangs when loading xDebug stopped working all of a sudden, connection is made, but website doesn't load Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant