Skip to content

Commit

Permalink
Add support for Xdebug version 2.7 version or newer.
Browse files Browse the repository at this point in the history
XML attribute value was changed from 'http' to 'https' protocol.
  • Loading branch information
martomo committed Nov 28, 2019
1 parent 14a5e75 commit a4ae196
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions xdebug/dbgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
ELEMENT_STACK = 'stack'

ELEMENT_PATH_BREAKPOINT = '{http://xdebug.org/dbgp/xdebug}message'
ELEMENT_PATH_SECURE_BREAKPOINT = '{https://xdebug.org/dbgp/xdebug}message'
ELEMENT_PATH_ERROR = '{urn:debugger_protocol_v1}error'
ELEMENT_PATH_MESSAGE = '{urn:debugger_protocol_v1}message'
ELEMENT_PATH_PROPERTY = '{urn:debugger_protocol_v1}property'
Expand All @@ -130,6 +131,7 @@

NOTIFY_ELEMENT_MESSAGE = 'xdebug:message'
NOTIFY_ELEMENT_PATH_MESSAGE = '{http://xdebug.org/dbgp/xdebug}message'
NOTIFY_ELEMENT_SECURE_PATH_MESSAGE = '{https://xdebug.org/dbgp/xdebug}message'

NOTIFY_MESSAGE_FILENAME = 'filename'
NOTIFY_MESSAGE_LINENO = 'lineno'
Expand Down
2 changes: 1 addition & 1 deletion xdebug/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def execute(self, command):

# Handle breakpoint hit
for child in response:
if child.tag == dbgp.ELEMENT_BREAKPOINT or child.tag == dbgp.ELEMENT_PATH_BREAKPOINT:
if child.tag == dbgp.ELEMENT_BREAKPOINT or child.tag == dbgp.ELEMENT_PATH_BREAKPOINT or child.tag == dbgp.ELEMENT_PATH_SECURE_BREAKPOINT:
# Get breakpoint attribute values
fileuri = child.get(dbgp.BREAKPOINT_FILENAME)
lineno = child.get(dbgp.BREAKPOINT_LINENO)
Expand Down

0 comments on commit a4ae196

Please sign in to comment.