martomo / SublimeTextXdebug

Xdebug debugger client for Sublime Text
MIT License
564 stars 89 forks source link

Failed to open Xdebug.expressions #142

Closed becassin closed 6 years ago

becassin commented 9 years ago
{
    "folders":
    [
        {
            "path": "."
        }
    ],
    "settings":
    {
        "xdebug":
        {
            "url": "http://dashboard.local"
        }
    }
}
zend_extension=/usr/local/Cellar/php56/5.6.6/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.remote_connect_back = 1
xdebug.remote_log="/var/log/xdebug/xdebug.log"

Issue: Breakpoints don't get hit. I set breakpoints on my file index.php (which gets called for sure):

{"/Library/WebServer/Documents/test/index.php": {"17": {"id": null, "enabled": true, "expression": null}, "18": {"id": null, "expression": null, "enabled": true}, "19": {"id": null, "enabled": true, "expression": null}}}

Xdebug.log shows:

[05/21/2015 03:59:37PM] INFO - ==== Loading 'Xdebug Client.sublime-package' package ====
[05/21/2015 03:59:37PM] INFO - Failed to open /Users/me/Library/Application Support/Sublime Text 3/Packages/User/Xdebug.expressions.
[05/21/2015 03:59:37PM] DEBUG - [Errno 2] No such file or directory: '/Users/me/Library/Application Support/Sublime Text 3/Packages/User/Xdebug.expressions'
[05/21/2015 03:59:37PM] INFO - Failed to parse /Users/me/Library/Application Support/Sublime Text 3/Packages/User/Xdebug.expressions.
[05/21/2015 03:59:37PM] DEBUG - local variable 'data_file' referenced before assignment

/var/log/xdebug/xdebug.log remains empty

Anyone met a similar issue?

becassin commented 9 years ago

just reproduced with a clean install of sublime

becassin commented 9 years ago

but /var/log/xdebug/xdebug.log does show stuff now:

Log opened at 2015-05-21 15:45:00
I: Checking remote connect back address.
I: Remote address found, connecting to 127.0.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///Library/WebServer/Documents/compuccino/dashboard/index.php" language="PHP" protocol_version="1.0" appid="2858"><engine version="2.3.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2015 by Derick Rethans]]></copyright></init>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

Log closed at 2015-05-21 15:45:01
floleg commented 8 years ago

Hi,

I have the same messages in Packages/User/Xdebug.log. I'm running Sublime Text 2 on Ubuntu and the breakpoints don't get hit either.

Did you find a solution?

tchalvak commented 7 years ago

Running Sublime Text 3, I get info notices/errors in my Packages/User/Xdebug.log:

[11/07/2016 10:06:16AM] INFO - ==== Loading 'Xdebug Client.sublime-package' package ==== [11/07/2016 10:06:16AM] INFO - Failed to open /home/user1/.config/sublime-text-3/Packages/User/Xdebug.expressions. [11/07/2016 10:06:16AM] DEBUG - [Errno 2] No such file or directory: '/home/user1/.config/sublime-text-3/Packages/User/Xdebug.expressions' [11/07/2016 10:06:16AM] INFO - Failed to parse /home/user1/.config/sublime-text-3/Packages/User/Xdebug.expressions. [11/07/2016 10:06:16AM] DEBUG - local variable 'data_file' referenced before assignment

It may be the case that it just tries to find a file for Xdebug watch expressions and doesn't find the file because none have ever been defined, or the like, and may not be a breaking error per se. Hard to tell.