Correctly track and now actually report running/paused status
It's quirky, we have to pass the stopped event to LoadThreads so that it can correctly work out the state of any _newly_ added threads. We now also correctly apply the allThreadsStopped=False behaviour where you must not allow expansion of such threads (in theory, that's untested).
This commit is contained in:
parent
2399a79cae
commit
a5d66a7477
3 changed files with 147 additions and 81 deletions
|
|
@ -1136,6 +1136,7 @@ class DebugSession( object ):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def OnEvent_continued( self, message ):
|
def OnEvent_continued( self, message ):
|
||||||
|
# FIXME: allThreadsContinued ?
|
||||||
self._stackTraceView.OnContinued()
|
self._stackTraceView.OnContinued()
|
||||||
self._codeView.SetCurrentFrame( None )
|
self._codeView.SetCurrentFrame( None )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,17 +22,57 @@ from vimspector import utils
|
||||||
|
|
||||||
|
|
||||||
class Thread:
|
class Thread:
|
||||||
|
"""The state of a single thread."""
|
||||||
PAUSED = 0
|
PAUSED = 0
|
||||||
RUNNING = 1
|
RUNNING = 1
|
||||||
|
TERMINATED = 3
|
||||||
state = RUNNING
|
state = RUNNING
|
||||||
|
|
||||||
|
stopped_event: typing.Dict
|
||||||
thread: typing.Dict
|
thread: typing.Dict
|
||||||
stacktrace: typing.List[ typing.Dict ]
|
stacktrace: typing.List[ typing.Dict ]
|
||||||
|
id: str
|
||||||
|
|
||||||
def __init__( self, thread ):
|
def __init__( self, thread ):
|
||||||
|
self.id = thread[ 'id' ]
|
||||||
|
self.stopped_event = None
|
||||||
|
self.Update( thread )
|
||||||
|
|
||||||
|
def Update( self, thread ):
|
||||||
self.thread = thread
|
self.thread = thread
|
||||||
self.stacktrace = None
|
self.stacktrace = None
|
||||||
|
|
||||||
|
def Paused( self, event ):
|
||||||
|
self.state = Thread.PAUSED
|
||||||
|
self.stopped_event = event
|
||||||
|
|
||||||
|
def Continued( self ):
|
||||||
|
self.state = Thread.RUNNING
|
||||||
|
self.stopped_event = None
|
||||||
|
|
||||||
|
def Exited( self ):
|
||||||
|
self.state = Thread.TERMINATED
|
||||||
|
self.stopped_event = None
|
||||||
|
|
||||||
|
def State( self ):
|
||||||
|
if self.state == Thread.PAUSED:
|
||||||
|
return self.stopped_event.get( 'description', 'paused' )
|
||||||
|
elif self.state == Thread.RUNNING:
|
||||||
|
return 'running'
|
||||||
|
return 'terminated'
|
||||||
|
|
||||||
|
def Expand( self, stack_trace ):
|
||||||
|
self.stacktrace = stack_trace
|
||||||
|
|
||||||
|
def Collapse( self ):
|
||||||
|
self.stacktrace = None
|
||||||
|
|
||||||
|
def IsExpanded( self ):
|
||||||
|
return self.stacktrace is not None
|
||||||
|
|
||||||
|
def CanExpand( self ):
|
||||||
|
return self.state == Thread.PAUSED
|
||||||
|
|
||||||
|
|
||||||
class StackTraceView( object ):
|
class StackTraceView( object ):
|
||||||
class ThreadRequestState:
|
class ThreadRequestState:
|
||||||
|
|
@ -40,6 +80,7 @@ class StackTraceView( object ):
|
||||||
REQUESTING = 1
|
REQUESTING = 1
|
||||||
PENDING = 2
|
PENDING = 2
|
||||||
|
|
||||||
|
# FIXME: Make into a dict by id ?
|
||||||
_threads: list[ Thread ]
|
_threads: list[ Thread ]
|
||||||
_line_to_thread = dict[ int, Thread ]
|
_line_to_thread = dict[ int, Thread ]
|
||||||
|
|
||||||
|
|
@ -87,6 +128,8 @@ class StackTraceView( object ):
|
||||||
self._current_syntax = ""
|
self._current_syntax = ""
|
||||||
self._threads.clear()
|
self._threads.clear()
|
||||||
self._sources = {}
|
self._sources = {}
|
||||||
|
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
||||||
|
self._pending_thread_request = None
|
||||||
with utils.ModifiableScratchBuffer( self._buf ):
|
with utils.ModifiableScratchBuffer( self._buf ):
|
||||||
utils.ClearBuffer( self._buf )
|
utils.ClearBuffer( self._buf )
|
||||||
|
|
||||||
|
|
@ -96,24 +139,24 @@ class StackTraceView( object ):
|
||||||
def ConnectionClosed( self ):
|
def ConnectionClosed( self ):
|
||||||
self.Clear()
|
self.Clear()
|
||||||
self._connection = None
|
self._connection = None
|
||||||
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
|
||||||
self._pending_thread_request = None
|
|
||||||
|
|
||||||
def Reset( self ):
|
def Reset( self ):
|
||||||
self.Clear()
|
self.Clear()
|
||||||
utils.CleanUpHiddenBuffer( self._buf )
|
utils.CleanUpHiddenBuffer( self._buf )
|
||||||
for b in self._scratch_buffers:
|
for b in self._scratch_buffers:
|
||||||
utils.CleanUpHiddenBuffer( b )
|
utils.CleanUpHiddenBuffer( b )
|
||||||
|
|
||||||
self._scratch_buffers = []
|
self._scratch_buffers = []
|
||||||
self._buf = None
|
self._buf = None
|
||||||
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
|
||||||
self._pending_thread_request = None
|
|
||||||
|
|
||||||
def LoadThreads( self, infer_current_frame, reason = '' ):
|
def LoadThreads( self,
|
||||||
|
infer_current_frame,
|
||||||
|
reason = '',
|
||||||
|
stopEvent = None ):
|
||||||
if self._requesting_threads != StackTraceView.ThreadRequestState.NO:
|
if self._requesting_threads != StackTraceView.ThreadRequestState.NO:
|
||||||
self._requesting_threads = StackTraceView.ThreadRequestState.PENDING
|
self._requesting_threads = StackTraceView.ThreadRequestState.PENDING
|
||||||
self._pending_thread_request = ( infer_current_frame, reason )
|
self._pending_thread_request = ( infer_current_frame,
|
||||||
|
reason,
|
||||||
|
stopEvent )
|
||||||
return
|
return
|
||||||
|
|
||||||
def consume_threads( message ):
|
def consume_threads( message ):
|
||||||
|
|
@ -131,19 +174,42 @@ class StackTraceView( object ):
|
||||||
|
|
||||||
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
||||||
self._pending_thread_request = None
|
self._pending_thread_request = None
|
||||||
|
|
||||||
|
existing_threads = self._threads[:]
|
||||||
self._threads.clear()
|
self._threads.clear()
|
||||||
|
|
||||||
|
if stopEvent is not None:
|
||||||
|
stoppedThreadId = stopEvent.get( 'threadId' )
|
||||||
|
allThreadsStopped = stopEvent.get( 'allThreadsStopped', False )
|
||||||
|
|
||||||
requesting = False
|
requesting = False
|
||||||
|
|
||||||
|
# FIXME: This is horribly inefficient
|
||||||
for t in message[ 'body' ][ 'threads' ]:
|
for t in message[ 'body' ][ 'threads' ]:
|
||||||
|
thread = None
|
||||||
|
for existing_thread in existing_threads:
|
||||||
|
if existing_thread.id == t[ 'id' ]:
|
||||||
|
thread = existing_thread
|
||||||
|
thread.Update( t )
|
||||||
|
break
|
||||||
|
|
||||||
|
if not thread:
|
||||||
thread = Thread( t )
|
thread = Thread( t )
|
||||||
|
|
||||||
self._threads.append( thread )
|
self._threads.append( thread )
|
||||||
|
|
||||||
|
if stopEvent:
|
||||||
|
if allThreadsStopped:
|
||||||
|
thread.Paused( stopEvent )
|
||||||
|
elif stoppedThreadId is not None and thread.id == stoppedThreadId:
|
||||||
|
thread.Paused( stopEvent )
|
||||||
|
|
||||||
if infer_current_frame:
|
if infer_current_frame:
|
||||||
if thread.thread[ 'id' ] == self._current_thread:
|
if thread.id == self._current_thread:
|
||||||
self._LoadStackTrace( thread, True, reason )
|
self._LoadStackTrace( thread, True, reason )
|
||||||
requesting = True
|
requesting = True
|
||||||
elif self._current_thread is None:
|
elif self._current_thread is None:
|
||||||
self._current_thread = thread.thread[ 'id' ]
|
self._current_thread = thread.id
|
||||||
self._LoadStackTrace( thread, True, reason )
|
self._LoadStackTrace( thread, True, reason )
|
||||||
requesting = True
|
requesting = True
|
||||||
|
|
||||||
|
|
@ -169,20 +235,14 @@ class StackTraceView( object ):
|
||||||
utils.ClearBuffer( self._buf )
|
utils.ClearBuffer( self._buf )
|
||||||
|
|
||||||
for thread in self._threads:
|
for thread in self._threads:
|
||||||
if self._current_thread == thread.thread[ 'id' ]:
|
if self._current_thread == thread.id:
|
||||||
icon = '^' if thread.stacktrace is None else '>'
|
icon = '^' if not thread.IsExpanded() else '>'
|
||||||
else:
|
else:
|
||||||
icon = '+' if thread.stacktrace is None else '-'
|
icon = '+' if not thread.IsExpanded() else '-'
|
||||||
|
|
||||||
# FIXME: We probably need per-thread status here
|
|
||||||
if thread.state == Thread.RUNNING:
|
|
||||||
status = ' (running)'
|
|
||||||
else:
|
|
||||||
status = ''
|
|
||||||
|
|
||||||
line = utils.AppendToBuffer(
|
line = utils.AppendToBuffer(
|
||||||
self._buf,
|
self._buf,
|
||||||
f'{icon} Thread: {thread.thread["name"]}{status}' )
|
f'{icon} Thread: {thread.thread["name"]} ({thread.State()})' )
|
||||||
|
|
||||||
self._line_to_thread[ line ] = thread
|
self._line_to_thread[ line ] = thread
|
||||||
self._DrawStackTrace( thread )
|
self._DrawStackTrace( thread )
|
||||||
|
|
@ -193,7 +253,7 @@ class StackTraceView( object ):
|
||||||
reason = '' ):
|
reason = '' ):
|
||||||
|
|
||||||
def consume_stacktrace( message ):
|
def consume_stacktrace( message ):
|
||||||
thread.stacktrace = message[ 'body' ][ 'stackFrames' ]
|
thread.Expand( message[ 'body' ][ 'stackFrames' ] )
|
||||||
if infer_current_frame:
|
if infer_current_frame:
|
||||||
for frame in thread.stacktrace:
|
for frame in thread.stacktrace:
|
||||||
if self._JumpToFrame( frame, reason ):
|
if self._JumpToFrame( frame, reason ):
|
||||||
|
|
@ -218,11 +278,14 @@ class StackTraceView( object ):
|
||||||
self._JumpToFrame( self._line_to_frame[ current_line ] )
|
self._JumpToFrame( self._line_to_frame[ current_line ] )
|
||||||
elif current_line in self._line_to_thread:
|
elif current_line in self._line_to_thread:
|
||||||
thread = self._line_to_thread[ current_line ]
|
thread = self._line_to_thread[ current_line ]
|
||||||
if thread.stacktrace is not None:
|
if thread.IsExpanded():
|
||||||
thread.stacktrace = None
|
thread.Collapse()
|
||||||
self._DrawThreads()
|
self._DrawThreads()
|
||||||
else:
|
elif thread.CanExpand():
|
||||||
self._LoadStackTrace( thread, False )
|
self._LoadStackTrace( thread, False )
|
||||||
|
else:
|
||||||
|
utils.UserMessage( "Thread is not stopped" )
|
||||||
|
|
||||||
|
|
||||||
def _JumpToFrame( self, frame, reason = '' ):
|
def _JumpToFrame( self, frame, reason = '' ):
|
||||||
def do_jump():
|
def do_jump():
|
||||||
|
|
@ -246,39 +309,41 @@ class StackTraceView( object ):
|
||||||
def OnContinued( self, threadId = None ):
|
def OnContinued( self, threadId = None ):
|
||||||
for thread in self._threads:
|
for thread in self._threads:
|
||||||
if threadId is None:
|
if threadId is None:
|
||||||
thread.state = Thread.RUNNING
|
thread.Continued()
|
||||||
elif thread.thread[ 'id' ] == threadId:
|
elif thread.id == threadId:
|
||||||
thread.state = Thread.RUNNING
|
thread.Continued()
|
||||||
break
|
break
|
||||||
|
|
||||||
self._DrawThreads()
|
self._DrawThreads()
|
||||||
|
|
||||||
def OnStopped( self, event ):
|
def OnStopped( self, event ):
|
||||||
if 'threadId' in event:
|
threadId = event.get( 'threadId' )
|
||||||
self._current_thread = event[ 'threadId' ]
|
allThreadsStopped = event.get( 'allThreadsStopped', False )
|
||||||
|
|
||||||
for thread in self._threads:
|
# Work out if we should change the current thread
|
||||||
if thread.thread[ 'id' ] == event[ 'threadId' ]:
|
if threadId is not None:
|
||||||
thread.state = Thread.PAUSED
|
self._current_thread = threadId
|
||||||
break
|
elif self._current_thread is None and allThreadsStopped and self._threads:
|
||||||
elif event.get( 'allThreadsStopped', False ):
|
self._current_thread = self._threads[ 0 ].id
|
||||||
if self._threads:
|
|
||||||
self._current_thread = self._threads[ 0 ].thread[ 'id' ]
|
|
||||||
|
|
||||||
for thread in self._threads:
|
self.LoadThreads( True, 'stopped', event )
|
||||||
thread.state = Thread.PAUSED
|
|
||||||
|
|
||||||
self.LoadThreads( True, 'stopped' )
|
|
||||||
|
|
||||||
def OnThreadEvent( self, event ):
|
def OnThreadEvent( self, event ):
|
||||||
|
infer_current_frame = False
|
||||||
if event[ 'reason' ] == 'started' and self._current_thread is None:
|
if event[ 'reason' ] == 'started' and self._current_thread is None:
|
||||||
self._current_thread = event[ 'threadId' ]
|
self._current_thread = event[ 'threadId' ]
|
||||||
self.LoadThreads( True )
|
infer_current_frame = True
|
||||||
else:
|
|
||||||
self.LoadThreads( False )
|
if event[ 'reason' ] == 'exited':
|
||||||
|
for thread in self._threads:
|
||||||
|
if thread.id == event[ 'threadId' ]:
|
||||||
|
thread.Exited()
|
||||||
|
break
|
||||||
|
|
||||||
|
self.LoadThreads( infer_current_frame )
|
||||||
|
|
||||||
def _DrawStackTrace( self, thread: Thread ):
|
def _DrawStackTrace( self, thread: Thread ):
|
||||||
if thread.stacktrace is None:
|
if not thread.IsExpanded():
|
||||||
return
|
return
|
||||||
|
|
||||||
for frame in thread.stacktrace:
|
for frame in thread.stacktrace:
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '> Thread: Thread #1',
|
\ '> Thread: Thread #1 (paused)',
|
||||||
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
|
|
@ -48,7 +48,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '> Thread: Thread #1',
|
\ '> Thread: Thread #1 (paused)',
|
||||||
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
|
|
@ -59,7 +59,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ '$',
|
\ '$',
|
||||||
|
|
@ -73,7 +73,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '> Thread: Thread #1',
|
\ '> Thread: Thread #1 (paused)',
|
||||||
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
|
|
@ -84,7 +84,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #3',
|
\ '+ Thread: Thread #3 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ '$',
|
\ '$',
|
||||||
|
|
@ -98,7 +98,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '> Thread: Thread #1',
|
\ '> Thread: Thread #1 (paused)',
|
||||||
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
|
|
@ -109,7 +109,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #4',
|
\ '+ Thread: Thread #4 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ '$',
|
\ '$',
|
||||||
|
|
@ -124,7 +124,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '> Thread: Thread #1',
|
\ '> Thread: Thread #1 (paused)',
|
||||||
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
|
|
@ -135,7 +135,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #5',
|
\ '+ Thread: Thread #5 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ '$',
|
\ '$',
|
||||||
|
|
@ -149,7 +149,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '> Thread: Thread #1',
|
\ '> Thread: Thread #1 (paused)',
|
||||||
\ ' .*: threads!main@threads.cpp:' . string( notify_l )
|
\ ' .*: threads!main@threads.cpp:' . string( notify_l )
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
|
|
@ -160,7 +160,7 @@ function! Test_Multiple_Threads_Continue()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #6',
|
\ '+ Thread: Thread #6 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ '$',
|
\ '$',
|
||||||
|
|
@ -189,7 +189,7 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '> Thread: Thread #1',
|
\ '> Thread: Thread #1 (paused)',
|
||||||
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
\ ' .*: threads!main@threads.cpp:' . string( thread_l )
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
|
|
@ -202,7 +202,7 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ '$',
|
\ '$',
|
||||||
|
|
@ -215,7 +215,7 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ '$',
|
\ '$',
|
||||||
|
|
@ -227,8 +227,8 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ '+ Thread: Thread #3',
|
\ '+ Thread: Thread #3 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ -1,
|
\ -1,
|
||||||
|
|
@ -241,8 +241,8 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ '+ Thread: Thread #3',
|
\ '+ Thread: Thread #3 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ -1,
|
\ -1,
|
||||||
|
|
@ -254,9 +254,9 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ '+ Thread: Thread #3',
|
\ '+ Thread: Thread #3 (paused)',
|
||||||
\ '+ Thread: Thread #4',
|
\ '+ Thread: Thread #4 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ -2,
|
\ -2,
|
||||||
|
|
@ -270,9 +270,9 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ '+ Thread: Thread #3',
|
\ '+ Thread: Thread #3 (paused)',
|
||||||
\ '+ Thread: Thread #4',
|
\ '+ Thread: Thread #4 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ -2,
|
\ -2,
|
||||||
|
|
@ -284,10 +284,10 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ '+ Thread: Thread #3',
|
\ '+ Thread: Thread #3 (paused)',
|
||||||
\ '+ Thread: Thread #4',
|
\ '+ Thread: Thread #4 (paused)',
|
||||||
\ '+ Thread: Thread #5',
|
\ '+ Thread: Thread #5 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ -3,
|
\ -3,
|
||||||
|
|
@ -301,10 +301,10 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ '+ Thread: Thread #3',
|
\ '+ Thread: Thread #3 (paused)',
|
||||||
\ '+ Thread: Thread #4',
|
\ '+ Thread: Thread #4 (paused)',
|
||||||
\ '+ Thread: Thread #5',
|
\ '+ Thread: Thread #5 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ -3,
|
\ -3,
|
||||||
|
|
@ -316,11 +316,11 @@ function! Test_Multiple_Threads_Step()
|
||||||
call WaitForAssert( {->
|
call WaitForAssert( {->
|
||||||
\ AssertMatchist(
|
\ AssertMatchist(
|
||||||
\ [
|
\ [
|
||||||
\ '+ Thread: Thread #2',
|
\ '+ Thread: Thread #2 (paused)',
|
||||||
\ '+ Thread: Thread #3',
|
\ '+ Thread: Thread #3 (paused)',
|
||||||
\ '+ Thread: Thread #4',
|
\ '+ Thread: Thread #4 (paused)',
|
||||||
\ '+ Thread: Thread #5',
|
\ '+ Thread: Thread #5 (paused)',
|
||||||
\ '+ Thread: Thread #6',
|
\ '+ Thread: Thread #6 (paused)',
|
||||||
\ ],
|
\ ],
|
||||||
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
\ GetBufLine( winbufnr( g:vimspector_session_windows.stack_trace ),
|
||||||
\ -4,
|
\ -4,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue