Skip to content

Commit

Permalink
More logging for breakpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
danmoseley committed Oct 18, 2015
1 parent 6bbbb4b commit fb7be0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions swi.py
Expand Up @@ -616,6 +616,7 @@ def run(self):
if channel:
if row in breaks:
try:
logger.info('Removing breakpoint in %s at %s' % (view_name, row))
channel.send(webkit.Debugger.removeBreakpoint(breaks[row]['breakpointId']))
except KeyError:
print("SWI: A key error occurred while removing the breakpoint")
Expand All @@ -638,8 +639,10 @@ def run(self):
scriptUrl = find_script_url(view_name)

if scriptUrl:
logger.info('Setting breakpoint by url for %s at %s' % (scriptUrl, row))
channel.send(webkit.Debugger.setBreakpointByUrl(int(row), scriptUrl), self.breakpointAdded, view_name)
else:
logger.info('Pending breakpoint for %s at %s' % (view_name, row))
set_breakpoint_by_full_path(view_name, row)

update_overlays()
Expand Down Expand Up @@ -674,6 +677,8 @@ def breakpointAdded(self, command):
else:
set_breakpoint_by_full_path(file_name, str(lineNumber), columnNumber, 'enabled', breakpointId)

logger.info('Breakpoint set in %s %s at (%s,%s)' % (scriptId, file_name, lineNumber, columnNumber))

update_overlays()

class SwiDebugStopCommand(sublime_plugin.WindowCommand):
Expand Down Expand Up @@ -853,6 +858,7 @@ def on_post_save(self, v):
if scriptId and set_script_source:
scriptSource = v.substr(sublime.Region(0, v.size()))
# Editing script can potentially modify the callstack
logger.info('Live updating script source %s %s' % (scriptId, find_script_url(scriptId)))
channel.send(webkit.Debugger.setScriptSource(scriptId, scriptSource), self.update_stack)

else:
Expand Down

0 comments on commit fb7be0e

Please sign in to comment.