6
votes
  • Xdebug installed on ubuntu 12.04 with sublime text build 3083 with help from this Helpful article

    1. added necessary lines in xdebug.ini file

    zend_extension=/usr/lib/php5/20090626/xdebug.so
    xdebug.remote_enable=on
    xdebug.remote_handler=dbgp
    xdebug.remote_host=localhost
    xdebug.remote_port=9500
    xdebug.show_local_vars=1
    xdebug.remote_log="/var/log/xdebug/xdebug.log"

    1. log file created on var/log/xdebug/xdebug.log
    2. installed XdebugClient through package control in Sublime Text3
    3. create project folder echo on var/www

Xdebug.sublime-settings

{
    "path_mapping": {
        "/var/www/echo/" : "/var/www/echo/"
    },
    "url": "http://localhost/echo/index.php",
    "super_globals": true,
    "close_on_stop": true
}

echo.sublime-project

{
    "folders":
    [
        {
            "path": "."
        }
    ],
    "settings":
    {
        "xdebug": {
            "path_mapping": {
                "/var/www/echo/" : "/var/www/echo/"
            },
            "url": "http://localhost/echo/index.php",
            "super_globals": true,
            "close_on_stop": true
        }
    }
}
  1. create first php page

index.php

<?php   
  echo "hello world";  
  phpinfo(); 
?>
  1. set breakpoint on first line

  2. click Tools > Xdebug Start Xdebug (launch browser)

page opens in browser with prefix end with ?XDEBUG_SESSION_START=sublime.xdebug

http://localhost/echo/?XDEBUG_SESSION_START=sublime.xdebug

it show 4 panel in the bottom of sublime text3

BUT now how to step in step out? it does not show anything in bottom panel

where am I missing any point ?

console output is

Traceback (most recent call last): File "./threading.py", line 901, in _bootstrap_inner
File "./threading.py", line 858, in run
File "main in /home/keshav/.config/sublime-text-3/Installed Packages/Xdebug Client.sublime-package", line 275, in listen
File "xdebug.protocol in /home/keshav/.config/sublime-text-3/Installed Packages/Xdebug Client.sublime-package", line 250, in listen Xdebug Client.xdebug.protocol.ProtocolConnectionException: [Errno 98] Address already in use

note: have seen similar issue on github but that does not help to resolve my issue.

Note: I have but unable to see such panel (shown below) inside sublime text3 which was described in another article , Xdebug install issue

1
hey.. you must have solved the issue..but wandering for an hour i came to this thread and it really helped me to figure out my mistake..also not sure what was wrong with your's but simply using right click on any of panel in xdebug i was able to get step in and out options..RohitS

1 Answers

-3
votes
  1. Restart apache.
  2. Change xdebug port number to avoid collision with web server port.

This will fix your issue.