Skip to content
This repository was archived by the owner on Nov 15, 2017. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Xdebug.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import types
import json
import webbrowser
import urllib2
from xml.dom.minidom import parseString


Expand Down Expand Up @@ -461,7 +462,7 @@ def callback(self, state):
if child.nodeName == 'xdebug:message':
#print '>>>break ' + child.getAttribute('filename') + ':' + child.getAttribute('lineno')
sublime.status_message('Xdebug: breakpoint')
xdebug_current = show_file(self.view.window(), child.getAttribute('filename'))
xdebug_current = show_file(self.view.window(), urllib2.unquote(child.getAttribute('filename')))
xdebug_current.current(int(child.getAttribute('lineno')))

if (res.getAttribute('status') == 'break'):
Expand Down Expand Up @@ -503,7 +504,7 @@ def getValues(node):
propWhere = child.getAttribute('where')
propLevel = child.getAttribute('level')
propType = child.getAttribute('type')
propFile = child.getAttribute('filename')
propFile = urllib2.unquote(child.getAttribute('filename'))
propLine = child.getAttribute('lineno')
result = result + unicode('{level:>3}: {type:<10} {where:<10} {filename}:{lineno}\n' \
.format(level=propLevel, type=propType, where=propWhere, lineno=propLine, filename=propFile))
Expand Down Expand Up @@ -656,6 +657,7 @@ def show_file(window, uri):
transport, filename = uri.split(':///', 1) # scheme:///C:/path/file => scheme, C:/path/file
else:
transport, filename = uri.split('://', 1) # scheme:///path/file => scheme, /path/file
filename = urllib2.unquote(filename)
if transport == 'file' and os.path.exists(filename):
window = sublime.active_window()
views = window.views()
Expand Down