Add a session ID to debug_session - vim only for now

This commit is contained in:
Ben Jackson 2020-12-03 20:42:32 +00:00
commit fb2bad216f
11 changed files with 320 additions and 156 deletions

View file

@ -107,3 +107,46 @@ function! Test_Python_Remote_Attach()
lcd -
%bwipeout!
endfunction
function! SetUp_Test_Python_Remote_Attach_With_Run()
let g:vimspector_enable_mappings = 'HUMAN'
endfunction
function! Test_Python_Remote_Attach_With_Run()
lcd ../support/test/python/simple_python
let fn='main.py'
exe 'edit ' . fn
call setpos( '.', [ 0, 6, 1 ] )
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 6, 1 )
call vimspector#test#signs#AssertSignGroupEmptyAtLine( 'VimspectorBP', 6 )
" Add the breakpoint
call feedkeys( "\<F9>", 'xt' )
call vimspector#test#signs#AssertSignGroupSingletonAtLine( 'VimspectorBP',
\ 6,
\ 'vimspectorBP',
\ 9 )
call setpos( '.', [ 0, 1, 1 ] )
" Here we go. Start Debugging (note will wait up to 10s for the script to do
" its virtualenv thing)
call vimspector#LaunchWithSettings( {
\ 'configuration': 'attach-run',
\ } )
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 6, 1 )
" Step
call feedkeys( "\<F10>", 'xt' )
call vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 7, 1 )
call WaitForAssert( {->
\ vimspector#test#signs#AssertPCIsAtLineInBuffer( fn, 7 )
\ } )
call vimspector#test#setup#Reset()
lcd -
%bwipeout!
endfunction