M
M
Muhammad2015-06-21 14:33:35
PHP
Muhammad, 2015-06-21 14:33:35

Debugging PHP with XDebug and Sublime Text 2?

Trying to link XDebug and Sublime Text. I installed XDebug, checked it - it works (there is a var_dump in phpinfo). The following settings are in php.ini:

zend_extension = "E:\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "E:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_connect_back = 1
;xdebug.trace_output_dir = "E:\xampp\tmp\XDebug"
xdebug.remote_port = 9000
xdebug.idekey = "sublime.xdebug"
xdebug.overload_var_dump = 1
xdebug.remote_autostart = 1
xdebug.default_enable = 1
xdebug.auto_trace = 1

I downloaded the XDebug Client plugin, set a breakpoint, started debugging with the following settings:
"ide_key": "sublime.xdebug",
"port": 9000,
"max_depth": 5,
"url": "http://localhost/ajax/public/index.php",

"path_mapping": {
"/var/www": "E:\\xampp\\htdocs"
 },

I go to:
localhost/ajax/public/?XDEBUG_SESSION_START=sublim...
But XDebug Content/Watch is empty for some reason. Tell me, please, what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Muhammad, 2015-06-21
@muhammad_97

Solved a problem.
php.ini:

zend_extension = "E:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_enable = On
xdebug.profiler_enable_trigger = On
xdebug.remote_enable = On
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_connect_back = On
xdebug.remote_port = 9000
xdebug.idekey = "sublime.xdebug"
xdebug.overload_var_dump = On
xdebug.remote_autostart = On
xdebug.default_enable = On
xdebug.auto_trace = On

XDebug.sublime-settings:
"url": "http://myurl.com",
 "path_mapping": {

       "/var/www/htdocs/mysite/public" : "E:/xampp/htdocs/mysite/public/index.php"

 },
"super_globals": true,
 "break_on_start": false,
"close_on_stop": true,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question