WIP: Support remote startup commands, e.g. gdbserver

This commit is contained in:
Ben Jackson 2019-02-02 10:46:53 +00:00 • committed by Ben Jackson
commit 1ca88ad332
2 changed files with 87 additions and 11 deletions

View file

@ -61,6 +61,25 @@ function! s:_Send( msg ) abort
return 1
endfunction
function! vimspector#internal#job#RunCommand( cmd ) abort
return job_start( a:cmd,
\ {
\ 'in_mode': 'raw',
\ 'out_mode': 'raw',
\ 'err_mode': 'raw',
\ 'out_cb': funcref( 's:_OnServerError' ),
\ 'err_cb': funcref( 's:_OnServerError' ),
\ 'stoponexit': 'term',
\ }
\ )
endfunction
function! vimspector#internal#job#KillCommand( job ) abort
if job_status( a:job ) == 'run'
call job_stop( a:job, 'term' )
endif
endfunction
function! vimspector#internal#job#StartDebugSession( config ) abort
if exists( 's:job' )
echom "Not starging: Job is already running"