3

I'm having a problem with Xdebug not working with Sublime Text 3. The server I've used is wampserver. I have use the Xdebug wizard for which version I'm supposed to install. Here's the picture:

Xdebug installation instruction

Here's the phpinfo for Xdebug:

Here's the phpinfo

Here's where the Xdebug extension is for Xdebug in php.ini:

    ; XDEBUG Extension
[xdebug]
zend_extension ="P:\wamp64\bin\php\php7.0.4\ext\php_xdebug-2.4.1-7.0-vc14-x86_64.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.profiler_output_dir ="P:/wamp64/tmp"
xdebug.show_local_vars=0

I've tried Xdebug sublime settings in Sublime Text like

Enter image description here

when I tried testing my PHP code, and it still didn't do anything.

I follow the website https://www.sitepoint.com/debugging-xdebug-sublime-text-3/ for configuring Xdebug, and it still didn't work at all.

1

2 Answers 2

2

In sublime settings you need a real url (you've put there a folder path).

You need something like: "url": "dev.myproject.com"


You can create you virtual host (at least in WampServer) directly from the main page of the Server (localhost - if you haven't override it - should give you the main configuration)enter image description here


In php.ini, besides other xdebug attributes, I found that I need the following activated in order for everything to work:

xdebug.remote_enable = On
xdebug.profiler_enable = On
xdebug.profiler_enable_trigger = On

Let me know if you need more info

Sign up to request clarification or add additional context in comments.

Comments

1

Check sublime terminal (Ctrl + ~). If it shows an error like, "xdebug xml.etree.ElementTree.ParseError: not well-formed (invalid token)," then it is issue of sublime xdebug client installed through sublime package manager.

  1. Uninstall xdebug client installed through Package manager:
    Preferences > Package control > remove package > xdebug client

  2. Quit sublime

  3. Install client manually through source code:
    Get fixed source code of xdebug client from GitHub: SublimeTextXdebug.

    • Download source code (do not follow install instructions, just download raw source code)
    • Copy source code directory to sublime packages directory. In mac it is here /users/[username]/library/Application Support/Sublime Text 3/Packages/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.