Add Pause command
This commit is contained in:
parent
b15c4a0902
commit
a5c773932e
2 changed files with 13 additions and 0 deletions
|
|
@ -143,6 +143,10 @@ function! vimspector#Continue() abort
|
||||||
py3 _session.Continue()
|
py3 _session.Continue()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! vimspector#Pause() abort
|
||||||
|
py3 _session.Pause()
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Boilerplate {{{
|
" Boilerplate {{{
|
||||||
let &cpo=s:save_cpo
|
let &cpo=s:save_cpo
|
||||||
unlet s:save_cpo
|
unlet s:save_cpo
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ class DebugSession( object ):
|
||||||
vim.command( 'nnoremenu WinBar.Next :call vimspector#StepOver()<CR>' )
|
vim.command( 'nnoremenu WinBar.Next :call vimspector#StepOver()<CR>' )
|
||||||
vim.command( 'nnoremenu WinBar.Step :call vimspector#StepInto()<CR>' )
|
vim.command( 'nnoremenu WinBar.Step :call vimspector#StepInto()<CR>' )
|
||||||
vim.command( 'nnoremenu WinBar.Finish :call vimspector#StepOut()<CR>' )
|
vim.command( 'nnoremenu WinBar.Finish :call vimspector#StepOut()<CR>' )
|
||||||
|
vim.command( 'nnoremenu WinBar.Pause :call vimspector#Pause()<CR>' )
|
||||||
|
|
||||||
vim.command( 'vspl' )
|
vim.command( 'vspl' )
|
||||||
vim.command( 'enew' )
|
vim.command( 'enew' )
|
||||||
|
|
@ -226,6 +227,14 @@ class DebugSession( object ):
|
||||||
},
|
},
|
||||||
} )
|
} )
|
||||||
|
|
||||||
|
def Pause( self ):
|
||||||
|
self._DoRequest( None, {
|
||||||
|
'command': 'pause',
|
||||||
|
'arguments': {
|
||||||
|
'threadId': self._currentThread
|
||||||
|
},
|
||||||
|
} )
|
||||||
|
|
||||||
|
|
||||||
def _DoRequest( self, handler, msg ):
|
def _DoRequest( self, handler, msg ):
|
||||||
this_id = self._next_message_id
|
this_id = self._next_message_id
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue