breakpoints list: fix listing while debugging

Also, open the quickfix list when listing breakpoints, and add a test
This commit is contained in:
Ben Jackson 2020-05-12 19:29:17 +01:00
commit 8c4112cd1f
3 changed files with 84 additions and 3 deletions

View file

@ -979,7 +979,13 @@ class DebugSession( object ):
self._stackTraceView.OnStopped( event )
def ListBreakpoints( self ):
return self._breakpoints.ListBreakpoints()
if self._connection:
qf = self._codeView.BreakpointsAsQuickFix()
else:
qf = self._breakpoints.BreakpointsAsQuickFix()
vim.eval( 'setqflist( {} )'.format( json.dumps( qf ) ) )
vim.command( 'copen' )
def ToggleBreakpoint( self, options ):
return self._breakpoints.ToggleBreakpoint( options )