Separate out the display of 'requested' and 'applied' breakpoints
This is a mess, with a load of duplication, but it's a step. When you request a breakpoint, we add one (in state ENABLED). You can then toggle it again to change to DISABLED. And once more to delete it. Once we start the debug server, that all changes and we just start sending the breakpoints directly to the server and updating based on the responses. This is far from ideal and somewhat jarring, but this approach allows me to play around with ideas about what the user experience should look like.
This commit is contained in:
parent
9d9c2214f3
commit
7d3af848cf
2 changed files with 66 additions and 10 deletions
|
|
@ -37,7 +37,6 @@ class CodeView( object ):
|
|||
'breakpoints': []
|
||||
}
|
||||
|
||||
|
||||
vim.current.window = self._window
|
||||
|
||||
vim.command( 'nnoremenu WinBar.Continute :call vimspector#Continue()<CR>' )
|
||||
|
|
@ -47,9 +46,7 @@ class CodeView( object ):
|
|||
vim.command( 'nnoremenu WinBar.Pause :call vimspector#Pause()<CR>' )
|
||||
vim.command( 'nnoremenu WinBar.Stop :call vimspector#Stop()<CR>' )
|
||||
|
||||
vim.command( 'sign define vimspectorPC text=>> texthl=Search' )
|
||||
vim.command( 'sign define vimspectorBP text=>> texthl=Error' )
|
||||
vim.command( 'sign define vimspectorBPDead text=>> texthl=Warning' )
|
||||
vim.command( 'sign define vimspectorPC text=> texthl=Search' )
|
||||
|
||||
|
||||
def SetCurrentFrame( self, frame ):
|
||||
|
|
@ -85,6 +82,8 @@ class CodeView( object ):
|
|||
self._signs[ 'vimspectorPC' ] = None
|
||||
|
||||
|
||||
# TODO: You know what, move breakpoint handling out of here into its own
|
||||
# thing. It really doesn't directly relate to the code view.
|
||||
def AddBreakpoints( self, source, breakpoints ):
|
||||
for breakpoint in breakpoints:
|
||||
if 'source' not in breakpoint:
|
||||
|
|
@ -124,5 +123,6 @@ class CodeView( object ):
|
|||
'sign place {0} line={1} name={2} file={3}'.format(
|
||||
sign_id,
|
||||
breakpoint[ 'line' ],
|
||||
'vimspectorBP' if breakpoint[ 'verified' ] else 'vimspectorBPDead',
|
||||
'vimspectorBP' if breakpoint[ 'verified' ]
|
||||
else 'vimspectorBPDisabled',
|
||||
file_name ) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue