Skip to content

Instantly share code, notes, and snippets.

@itwondersteam
Last active February 21, 2023 01:19
Show Gist options
  • Save itwondersteam/0c32a8957e9acd79266e6951bfc4b88d to your computer and use it in GitHub Desktop.
Save itwondersteam/0c32a8957e9acd79266e6951bfc4b88d to your computer and use it in GitHub Desktop.
1
2 Log opened at 2023-02-20 23:34:41
3 I: Connecting to configured address/port: host.docker.internal:9000.
4 I: Connected to client. :-)
5 -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/server.php" language="PHP" xdebug:language_version="7.2. 5 34" protocol_version="1.0" appid="13" idekey="XDEBUG_ECLIPSE"><engine version="2.6.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDAT 5 A[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2018 by Derick Rethans]]></copyright></init>
6
7 <- feature_get -i 1 -n resolved_breakpoints
8 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="1" feature_name="resolved_breakpoints" 8 supported="0"><![CDATA[0]]></response>
9
10 <- feature_get -i 2 -n notify_ok
11 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="2" feature_name="notify_ok" supported=" 11 1"><![CDATA[0]]></response>
12
13 <- feature_set -i 3 -n notify_ok -v 1
14 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="notify_ok" success="1"></re 14 sponse>
15
16 <- feature_get -i 4 -n extended_properties
17 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="4" feature_name="extended_properties" s 17 upported="1"><![CDATA[0]]></response>
18
19 <- feature_set -i 5 -n extended_properties -v 1
20 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="5" feature="extended_properties" succes 20 s="1"></response>
21
22 <- feature_get -i 6 -n breakpoint_include_return_value
23 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="6" feature_name="breakpoint_include_ret 23 urn_value" supported="0"><![CDATA[0]]></response>
24
25 <- feature_set -i 7 -n max_children -v 100
26 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="7" feature="max_children" success="1">< 26 /response>
27
28 <- breakpoint_set -i 8 -t line -f file:///var/www/app/Http/Controllers/CCtvController.php -n 83
29 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="130076"></response>
30
36
37 <- run -i 11
38 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="11" status="stopping" reason="ok"></response>
39
40 <- stop -i 12
41 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="12" status="stopped" reason="ok"></response>
42
43 Log closed at 2023-02-20 23:34:42
44
@itwondersteam
Copy link
Author

itwondersteam commented Feb 21, 2023

vscode

launch.json

        {
            "name": "Listen for docker Xdebug 2",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "pathMappings": {
                "/var/www": "${workspaceFolder}"
            }
        },

// note: to check setting below
VS Code extension logfile (from setting "log": true in launch.json):

@itwondersteam
Copy link
Author

xdebug.ini (docker)

# enabled by docker-php-ext-enable xdebug
; zend_extension=xdebug.so
xdebug.mode=develop,debug
xdebug.start_with_request=yes
xdebug.discover_client_host=0
xdebug.client_host=host.docker.internal
xdebug.output_dir=/tmp/xdebug
xdebug.log=/tmp/xdebug/xdebug.log

# xdebug 2
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_log="/tmp/xdebug/xdebug.log"
# uncomment below if need to debug
#xdebug.remote_log_level=7
xdebug.remote_host=host.docker.internal
#xdebug.remote_port=9000
#xdebug.client_port=9003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment