Skip to content

Commit 92841ce

Browse files
committed
Add single break-point when error is under cursor
1 parent 8a6d484 commit 92841ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

autoload/OmniSharp/testrunner.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,14 @@ function! OmniSharp#testrunner#SetBreakpoints() abort
248248
echohl None
249249
return
250250
endif
251+
let line = getline('.')
252+
" Stack trace with valid location (filename and possible line number)
253+
let parsed = matchlist(line, '^> \+__ .* ___ \(.*\) __ \%(line \(\d\+\)\)\?$')
254+
if len(parsed) && parsed[2] !=# ''
255+
call vimspector#SetLineBreakpoint(parsed[1], str2nr(parsed[2]))
256+
echomsg 'Break point set'
257+
return
258+
endif
251259
let test = s:utils.findTest()
252260
if !has_key(test, 'stacktrace')
253261
echo 'No breakpoints added'

0 commit comments

Comments
 (0)