Add support for multi-srcpath
Now Vebugger can search for a sourcecode in multiple srcpath locations. The first match is returned and it's the file Vebugger will show.
This commit is contained in:
parent
97ca687489
commit
4230773e7e
@ -87,14 +87,16 @@ function! s:findFolderFromStackTrace(src,nameFromStackTrace,frameNumber)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" If no such tag was found, try to find it using the src path.
|
" If no such tag was found, try to find it using the src path.
|
||||||
let l:path=a:src
|
for l:one_path in split(a:src, ':')
|
||||||
for l:dirname in split(a:nameFromStackTrace,'\.')
|
let l:path=l:one_path
|
||||||
let l:nextPath=l:path.'/'.fnameescape(l:dirname)
|
for l:dirname in split(a:nameFromStackTrace,'\.')
|
||||||
if empty(glob(l:nextPath))
|
let l:nextPath=l:path.'/'.fnameescape(l:dirname)
|
||||||
return l:path
|
if empty(glob(l:nextPath))
|
||||||
endif
|
return l:path
|
||||||
let l:path=l:nextPath
|
endif
|
||||||
endfor
|
let l:path=l:nextPath
|
||||||
|
endfor
|
||||||
|
endfor
|
||||||
return l:path
|
return l:path
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ Unlike in the other debuggers, the first argument here is not the name of a
|
|||||||
file - it's the name of the class to run. The supported extra arguments are:
|
file - it's the name of the class to run. The supported extra arguments are:
|
||||||
* "args": Command line arguments for the debugged program
|
* "args": Command line arguments for the debugged program
|
||||||
* "classpath": Where to look for class files
|
* "classpath": Where to look for class files
|
||||||
* "srcpath": Where to look for source files
|
* "srcpath": Where to look for source files. You can have multiple srcpaths, separated by ':'
|
||||||
* "version": The version of the debugger to run
|
* "version": The version of the debugger to run
|
||||||
If you don't supply "classpath" and "srcpath", Vebugger will assume you are
|
If you don't supply "classpath" and "srcpath", Vebugger will assume you are
|
||||||
using the current directory for source files and class files.
|
using the current directory for source files and class files.
|
||||||
@ -210,6 +210,10 @@ using the current directory for source files and class files.
|
|||||||
JDB does not have a command for starting it, since you usually want to supply
|
JDB does not have a command for starting it, since you usually want to supply
|
||||||
"classpath" and "srcpath".
|
"classpath" and "srcpath".
|
||||||
|
|
||||||
|
If you need Vebugger to search for the source files in multiple locations, you can
|
||||||
|
specify `srcpath` as a ':' separated string. Vebugger will search on all these folders
|
||||||
|
and the first match will be returned as the Source file to be shown.
|
||||||
|
|
||||||
|
|
||||||
LAUNCHING RDEBUG *vebugger-rdebug*
|
LAUNCHING RDEBUG *vebugger-rdebug*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user