Added shell buffer support for rdebug
Also made it skip stops at external files
This commit is contained in:
parent
2d1c16a588
commit
f7af3d4406
@ -5,7 +5,14 @@ function! vebugger#rdebug#start(entryFile,args)
|
||||
\: 'ruby -rdebug')
|
||||
\.' '.a:entryFile)
|
||||
let l:debugger.state.rdebug={}
|
||||
let l:debugger.state.std.config.externalFileStop_flowCommand='stepover' "skip external modules
|
||||
|
||||
|
||||
call l:debugger.writeLine("$stdout=$stderr")
|
||||
let l:debugger.pipes.err.annotation = "err&prg\t\t"
|
||||
call vebugger#std#openShellBuffer(l:debugger)
|
||||
|
||||
call l:debugger.addReadHandler(function('s:readProgramOutput'))
|
||||
call l:debugger.addReadHandler(function('s:readWhere'))
|
||||
call l:debugger.addReadHandler(function('s:readEvaluatedExpressions'))
|
||||
|
||||
@ -21,6 +28,12 @@ function! vebugger#rdebug#start(entryFile,args)
|
||||
return l:debugger
|
||||
endfunction
|
||||
|
||||
function! s:readProgramOutput(pipeName,line,readResult,debugger)
|
||||
if 'err'==a:pipeName
|
||||
let a:readResult.std.programOutput={'line':a:line}
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:readWhere(pipeName,line,readResult,debugger)
|
||||
if 'out'==a:pipeName
|
||||
let l:matches=matchlist(a:line,'\v^([^:]+)\:(\d+)\:(.*)$')
|
||||
|
@ -2,6 +2,8 @@ let g:vebugger_breakpoints=[]
|
||||
|
||||
function! vebugger#std#setStandardState(debugger)
|
||||
let a:debugger.state.std={
|
||||
\'config':{
|
||||
\ 'externalFileStop_flowCommand':''},
|
||||
\'location':{},
|
||||
\'callstack':[],
|
||||
\'evaluateExpressions':[]}
|
||||
@ -127,6 +129,12 @@ endfunction
|
||||
|
||||
function! s:standardThinkHandlers.moveToCurrentLine(readResult,debugger) dict
|
||||
if !empty(a:readResult.std.location)
|
||||
if !empty(a:debugger.state.std.config.externalFileStop_flowCommand) " Do we need to worry about stopping at external files?
|
||||
if 0!=stridx(tolower(fnamemodify(a:readResult.std.location.file,':p')),tolower(getcwd()))
|
||||
call a:debugger.setWriteAction('std','flow',a:debugger.state.std.config.externalFileStop_flowCommand)
|
||||
return
|
||||
endif
|
||||
endif
|
||||
if a:debugger.state.std.location!=a:readResult.std.location
|
||||
if has_key(a:debugger.state.std.location,'file')
|
||||
exe 'sign unplace 1 file='.fnameescape(fnamemodify(a:debugger.state.std.location.file,':p'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user