2013-12-23 16:37:18 -05:00
|
|
|
|
|
|
|
|
2015-02-28 12:37:54 -05:00
|
|
|
command! -nargs=0 VBGrepeat call vebugger#repeatLastUserAction()
|
|
|
|
|
2015-02-28 12:16:25 -05:00
|
|
|
command! -nargs=1 VBGrawWrite call vebugger#userAction('writeLine', <q-args>)
|
2014-02-07 19:33:18 -05:00
|
|
|
command! -nargs=0 VBGkill call vebugger#killDebugger()
|
|
|
|
|
2015-02-28 12:16:25 -05:00
|
|
|
command! -nargs=0 VBGstepIn call vebugger#userAction('setWriteActionAndPerform', 'std', 'flow', 'stepin')
|
|
|
|
command! -nargs=0 VBGstepOver call vebugger#userAction('setWriteActionAndPerform', 'std', 'flow', 'stepover')
|
|
|
|
command! -nargs=0 VBGstepOut call vebugger#userAction('setWriteActionAndPerform', 'std', 'flow', 'stepout')
|
|
|
|
command! -nargs=0 VBGcontinue call vebugger#userAction('setWriteActionAndPerform', 'std', 'flow', 'continue')
|
2013-12-27 17:08:42 -05:00
|
|
|
|
2015-02-28 12:16:25 -05:00
|
|
|
command! -nargs=0 VBGtoggleTerminalBuffer call vebugger#userAction('toggleTerminalBuffer')
|
2014-05-19 12:06:30 -04:00
|
|
|
command! -nargs=+ -complete=file VBGtoggleBreakpoint call vebugger#std#toggleBreakpoint(<f-args>)
|
2013-12-28 15:23:33 -05:00
|
|
|
command! -nargs=0 VBGtoggleBreakpointThisLine call vebugger#std#toggleBreakpoint(expand('%:~:.'),line('.'))
|
2015-06-27 07:03:59 -04:00
|
|
|
command! -nargs=0 VBGclearBreakpoints call vebugger#std#clearBreakpoints()
|
2013-12-27 17:17:31 -05:00
|
|
|
|
2015-02-28 12:16:25 -05:00
|
|
|
command! -nargs=1 VBGeval call vebugger#userAction('std_eval', <q-args>)
|
|
|
|
command! -nargs=0 VBGevalWordUnderCursor call vebugger#userAction('std_eval', expand('<cword>'))
|
|
|
|
command! -nargs=1 VBGexecute call vebugger#userAction('std_execute', <q-args>)
|
2014-01-17 17:36:13 -05:00
|
|
|
|
2015-02-28 12:16:25 -05:00
|
|
|
command! -range -nargs=0 VBGevalSelectedText call vebugger#userAction('std_eval', vebugger#util#get_visual_selection())
|
|
|
|
command! -range -nargs=0 VBGexecuteSelectedText call vebugger#userAction('std_execute', vebugger#util#get_visual_selection())
|
|
|
|
command! -range -nargs=0 VBGrawWriteSelectedText call vebugger#userAction('writeLine', vebugger#util#get_visual_selection())
|
2014-01-17 17:36:13 -05:00
|
|
|
|
2014-05-17 12:23:15 -04:00
|
|
|
command! -nargs=+ -complete=file VBGstartGDB call vebugger#gdb#start([<f-args>][0],{'args':[<f-args>][1:]})
|
2015-02-15 17:41:08 -05:00
|
|
|
function! s:attachGDB(...)
|
|
|
|
if 1 == a:0
|
|
|
|
let l:processId=vebugger#util#selectProcessOfFile(a:1)
|
|
|
|
if 0 < l:processId
|
|
|
|
call vebugger#gdb#start(a:1, {'pid': l:processId})
|
|
|
|
endif
|
|
|
|
elseif 2 == a:0
|
|
|
|
if a:2 =~ '\v^\d+$'
|
|
|
|
call vebugger#gdb#start(a:1,{'pid': str2nr(a:2)})
|
|
|
|
else
|
|
|
|
call vebugger#gdb#start(a:1, {'con': a:2})
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
throw "Can't call VBGattachGDB with ".a:0." arguments"
|
|
|
|
endif
|
|
|
|
endfunction
|
|
|
|
command! -nargs=+ -complete=file VBGattachGDB call s:attachGDB(<f-args>)
|
2014-05-17 12:23:15 -04:00
|
|
|
command! -nargs=+ -complete=file VBGstartRDebug call vebugger#rdebug#start([<f-args>][0],{'args':[<f-args>][1:]})
|
|
|
|
command! -nargs=+ -complete=file VBGstartPDB call vebugger#pdb#start([<f-args>][0],{'args':[<f-args>][1:]})
|
2014-06-23 18:46:03 -04:00
|
|
|
command! -nargs=+ -complete=file VBGstartPDB2 call vebugger#pdb#start([<f-args>][0],{'args':[<f-args>][1:],'version':'2'})
|
|
|
|
command! -nargs=+ -complete=file VBGstartPDB3 call vebugger#pdb#start([<f-args>][0],{'args':[<f-args>][1:],'version':'3'})
|
2014-06-23 17:05:51 -04:00
|
|
|
command! -nargs=+ -complete=file VBGstartGDBForD call vebugger#gdb#start([<f-args>][0],{'args':[<f-args>][1:],'entry':'_Dmain'})
|
2014-01-17 17:36:13 -05:00
|
|
|
|
2013-12-27 17:17:31 -05:00
|
|
|
if exists('g:vebugger_leader')
|
|
|
|
if !empty(g:vebugger_leader)
|
|
|
|
for s:mapping in items({
|
|
|
|
\'i':'VBGstepIn',
|
|
|
|
\'o':'VBGstepOver',
|
|
|
|
\'O':'VBGstepOut',
|
2013-12-28 15:23:33 -05:00
|
|
|
\'c':'VBGcontinue',
|
2014-05-14 14:52:55 -04:00
|
|
|
\'t':'VBGtoggleTerminalBuffer',
|
2014-01-17 17:36:13 -05:00
|
|
|
\'b':'VBGtoggleBreakpointThisLine',
|
2015-06-27 07:03:59 -04:00
|
|
|
\'B':'VBGclearBreakpoints',
|
2014-05-14 15:52:01 -04:00
|
|
|
\'e':'VBGevalWordUnderCursor',
|
2014-05-14 15:58:02 -04:00
|
|
|
\'E':'exe "VBGeval ".input("VBG-Eval> ")',
|
2014-05-16 16:58:02 -04:00
|
|
|
\'x':'exe "VBGexecute ".getline(".")',
|
|
|
|
\'X':'exe "VBGexecute ".input("VBG-Exec> ")',
|
2014-05-17 13:57:10 -04:00
|
|
|
\'R':'exe "VBGrawWrite ".input("VBG> ")'})
|
2013-12-27 17:17:31 -05:00
|
|
|
exe 'nnoremap '.g:vebugger_leader.s:mapping[0].' :'.s:mapping[1].'<Cr>'
|
|
|
|
endfor
|
2014-01-17 17:36:13 -05:00
|
|
|
for s:mapping in items({
|
2014-05-14 15:52:01 -04:00
|
|
|
\'e':'VBGevalSelectedText',
|
2014-05-17 13:57:10 -04:00
|
|
|
\'x':'VBGexecuteSelectedText',
|
|
|
|
\'r':'VBGrawWriteSelectedText'})
|
2014-01-17 17:36:13 -05:00
|
|
|
exe 'vnoremap '.g:vebugger_leader.s:mapping[0].' :'.s:mapping[1].'<Cr>'
|
|
|
|
endfor
|
2013-12-27 17:17:31 -05:00
|
|
|
endif
|
|
|
|
endif
|