Correctly handle the 'continue' response when continuing a specific thread
This commit is contained in:
parent
7d5ad3ffa1
commit
82307ff1ba
2 changed files with 17 additions and 7 deletions
|
|
@ -477,8 +477,13 @@ class DebugSession( object ):
|
|||
utils.UserMessage( 'No current thread', persist = True )
|
||||
return
|
||||
|
||||
def handler( *_ ):
|
||||
self._stackTraceView.OnContinued( { 'threadId': threadId } )
|
||||
def handler( msg ):
|
||||
self._stackTraceView.OnContinued( {
|
||||
'threadId': threadId,
|
||||
'allThreadsContinued': ( msg.get( 'body' ) or {} ).get(
|
||||
'allThreadsContinued',
|
||||
True )
|
||||
} )
|
||||
self._codeView.SetCurrentFrame( None )
|
||||
|
||||
self._connection.DoRequest( handler, {
|
||||
|
|
|
|||
|
|
@ -192,14 +192,15 @@ class StackTraceView( object ):
|
|||
self.LoadThreads( *self._pending_thread_request )
|
||||
return
|
||||
|
||||
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
||||
self._pending_thread_request = None
|
||||
|
||||
if not ( message.get( 'body' ) or {} ).get( 'threads' ):
|
||||
# This is a protocol error. It is required to return at least one!
|
||||
utils.UserMessage( 'Protocol error: Server returned no threads',
|
||||
persist = False,
|
||||
error = True )
|
||||
|
||||
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
||||
self._pending_thread_request = None
|
||||
return
|
||||
|
||||
existing_threads = self._threads[ : ]
|
||||
self._threads.clear()
|
||||
|
|
@ -367,14 +368,18 @@ class StackTraceView( object ):
|
|||
return do_jump()
|
||||
|
||||
|
||||
|
||||
def PauseContinueThread( self ):
|
||||
thread = self._GetSelectedThread()
|
||||
if thread is None:
|
||||
utils.UserMessage( 'No thread selected' )
|
||||
elif thread.state == Thread.PAUSED:
|
||||
self._session._connection.DoRequest(
|
||||
lambda *_: self.OnContinued( { 'threadId': thread.id } ),
|
||||
lambda msg: self.OnContinued( {
|
||||
'threadId': thread.id,
|
||||
'allThreadsContinued': ( msg.get( 'body' ) or {} ).get(
|
||||
'allThreadsContinued',
|
||||
True )
|
||||
} ),
|
||||
{
|
||||
'command': 'continue',
|
||||
'arguments': {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue