SublimeTextXdebug: Xdebug Console Error When Reading Context
The Xdebug Context is never populated because there is an error (xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 2, column 572) when trying to read the context value from Xdebug. I see the issue https://github.com/martomo/SublimeTextXdebug/issues/172, but I tried turning off super globals as well as switching to three different versions of Xdebug. None of those seemed to do the trick.
I’ve done my best to debug this myself, but after many hours I’ve come up short. If anyone has any suggestions I’d love to hear them. I’ve included the details of my setup below.
Environment
Sublime Text
Operating system: Windows 10 Installed version/build: Version 3.1.1, Build 3176 Python version: 3.3.6
Server
Operating system: I’m trying to run the script locally using Wamp. PHP/Xdebug version: PHP: 7.0.10 Xdebug: I have tried 2.5.5, 2.6.0 and 2.7.0alpha
Configuration
php.ini/xdebug.ini
[xdebug]
;zend_extension = c:\wamp\bin\php\php7.0.10\ext\php_xdebug-2.5.5-7.0-vc14-x86_64.dll
;zend_extension = c:\wamp\bin\php\php7.0.10\ext\php_xdebug-2.6.0-7.0-vc14-x86_64.dll
zend_extension = c:\wamp\bin\php\php7.0.10\ext\php_xdebug-2.7.0alpha1-7.0-vc14-x86_64.dll
xdebug.remote_enable = 1
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.remote_connect_back = 0
xdebug.remote_autostart = 0
xdebug.remote_log = C:/wamp/logs/xdebug.log
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = On
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="c:/wamp/tmp"
xdebug.show_local_vars=0
# ...
Packages/User/Xdebug.sublime-settings
{
"debug": true,
"super_globals": false,
}
*.sublime-project
{
"folders":
[
{
"path": "."
}
],
"settings": {
"xdebug": {
"url": "http://localhost/wiredwebsites/",
"path_mapping": {
"C:\\wamp\\www\\wiredwebsites\\" : "C:/wamp/www/wiredwebsites/",
},
}
}
}
Logs
Console output:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "C:\Users\......\AppData\Roaming\Sublime Text 3\Installed Packages\Xdebug Client.sublime-package\xdebug/session.py", line 148, in run
self.execute(self.get_option('command'))
File "C:\Users\......\AppData\Roaming\Sublime Text 3\Installed Packages\Xdebug Client.sublime-package\xdebug/session.py", line 240, in execute
context = self.get_context_values()
File "C:\Users\......\AppData\Roaming\Sublime Text 3\Installed Packages\Xdebug Client.sublime-package\xdebug/session.py", line 276, in get_context_values
response = S.SESSION.read()
File "C:\Users\......\AppData\Roaming\Sublime Text 3\Installed Packages\Xdebug Client.sublime-package\xdebug/protocol.py", line 195, in read
document = ET.fromstring(data)
File "./python3.3/xml/etree/ElementTree.py", line 1356, in XML
File "<string>", line None
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 2, column 572
Packages/User/Xdebug.log: I’m not including this because the contents is huge, but let me know if you need this information.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 8
- Comments: 18 (1 by maintainers)
@RM4LA I renamed the extension to zip from Xdebug Client.sublime-package, unpacked it, inserted the changes in the xdebug / protocol.py file, packed it back into zip, and renamed it back to Xdebug Client.sublime-package. Move to sublime folder
protocol.py after line 135 paste this: elif text[1:-1] == ‘quot’: text = “'”
@mercurykd , thanks tried to insert your code into protocol.py :
135 pass136 elif text[1:-1] == 'quot':137 text = "'"138 else:but after SublimeTextXdebug not working at all(even menu is grey)
what i didnt got?