Skip to content
Open
Show file tree
Hide file tree
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: 6 additions & 0 deletions Xdebug.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
// Note: This will only work if you have the 'url' setting configured.
"launch_browser": false,

// Don't launch browser when session stops
"dont_launch_on_stop": false,

// Ignore length size errors
"ignore_length_check": false,

// When launching browser on session stop do not execute script.
// By using parameter XDEBUG_SESSION_STOP_NO_EXEC instead of XDEBUG_SESSION_STOP.
"browser_no_execute": false,
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def run(self, close_windows=False, launch_browser=False, restart=False):
self.window.active_view().run_command('xdebug_breakpoint', {'rows': [S.BREAKPOINT_RUN['lineno']], 'filename': S.BREAKPOINT_RUN['filename']})
S.BREAKPOINT_RUN = None
# Launch browser
if launch_browser or (config.get_value(S.KEY_LAUNCH_BROWSER) and not restart):
if launch_browser or (config.get_value(S.KEY_LAUNCH_BROWSER) and not config.get_value(S.KEY_DONT_LAUNCH_ON_STOP) and not restart):
util.launch_browser()
# Close or reset debug layout
if close_windows or config.get_value(S.KEY_CLOSE_ON_STOP):
Expand Down
7 changes: 6 additions & 1 deletion xdebug/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ def read_data(self):
if int(length) == len(message):
return message
else:
raise ProtocolException("Length mismatch encountered while reading the Xdebug message")
error = "Length mismatch encountered while reading the Xdebug message %s:%s" % (length, message)
if get_value(S.KEY_IGNORE_LENGTH_CHECK):
print(error)
return message
else:
raise ProtocolException(error)

def read(self, return_string=False):
"""
Expand Down
6 changes: 5 additions & 1 deletion xdebug/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
KEY_BROWSER_NO_EXECUTE = "browser_no_execute"
KEY_DISABLE_LAYOUT = "disable_layout"
KEY_DEBUG_LAYOUT = "debug_layout"
KEY_DONT_LAUNCH_ON_STOP = "dont_launch_on_stop"
KEY_IGNORE_LENGTH_CHECK = "ignore_length_check"

KEY_BREAKPOINT_GROUP = "breakpoint_group"
KEY_BREAKPOINT_INDEX = "breakpoint_index"
Expand Down Expand Up @@ -118,5 +120,7 @@
KEY_BREAKPOINT_ENABLED,
KEY_CURRENT_LINE,
KEY_PYTHON_PATH,
KEY_DEBUG
KEY_DEBUG,
KEY_DONT_LAUNCH_ON_STOP,
KEY_IGNORE_LENGTH_CHECK
]