简体   繁体   中英

Setting Up Sublime Text with XDebug (windows 7 environment)

I'm attempting to set up xdebug with Sublime Text 2 and I'm having some issues getting it to work.

I'm doing this on a Windows 7 environment using xampp, so setting up XDebug was simply a matter of configuring it in the php.ini file. Below are my config settings:

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable = 1
xdebug.remote_host = "localhost"
xdebug.remote_port = 8000
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.remote_connect_back = 1

I'm using laravel 4 for my framework.

I installed the xdebug plugin for sublime: https://github.com/martomo/SublimeTextXdebug

I believe that this is set up properly. I can set breakpoints etc.

In sublime i created a project in the root directory of my laravel project and edit the *.sublime-project file as follows:

{
"folders":
[
    {
        "path": "/C/****/****/****/sites/questionairre/"
                    //this is the root of my project folder
    }
],
"settings":
{
    "xdebug":
    {
        "url": "http://localhost:8000"
    }
}

}

Now that that is out of the way, I'll typically set a breakpoint, and then start to debug. 4 windows open: "Xdebug Context", "Xdebug Watch", "Xdebug Stack", "Xdebug Breakpoint". However, my default browser does not open. Is something configured wrong?

Thanks for reading through this long message.

I know this question was asked a long time ago but in case it helps someone...

In terms of getting the browser to open I set "url": "http://localhost/index.php" ie with index.php included in the path and the browser then launches when Start Debugging (Launch Browser) is clicked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM