Per the updated protocol descritpion, delay sending Launch/Attach until we have ConfigurationDone
This commit is contained in:
parent
4539ad327f
commit
b30a9fc870
1 changed files with 19 additions and 10 deletions
|
|
@ -448,11 +448,6 @@ class DebugSession( object ):
|
||||||
|
|
||||||
def _Initialise( self ):
|
def _Initialise( self ):
|
||||||
adapter_config = self._adapter
|
adapter_config = self._adapter
|
||||||
launch_config = self._configuration[ 'configuration' ]
|
|
||||||
|
|
||||||
if launch_config.get( 'request' ) == "attach":
|
|
||||||
self._SelectProcess( adapter_config, launch_config )
|
|
||||||
|
|
||||||
self._connection.DoRequest( None, {
|
self._connection.DoRequest( None, {
|
||||||
'command': 'initialize',
|
'command': 'initialize',
|
||||||
'arguments': {
|
'arguments': {
|
||||||
|
|
@ -469,15 +464,28 @@ class DebugSession( object ):
|
||||||
},
|
},
|
||||||
} )
|
} )
|
||||||
|
|
||||||
|
|
||||||
|
def _Launch( self ):
|
||||||
|
self._logger.debug( "LAUNCH!" )
|
||||||
|
adapter_config = self._adapter
|
||||||
|
launch_config = self._configuration[ 'configuration' ]
|
||||||
|
|
||||||
|
if launch_config.get( 'request' ) == "attach":
|
||||||
|
self._SelectProcess( adapter_config, launch_config )
|
||||||
|
|
||||||
# FIXME: name is mandatory. Forcefully add it (we should really use the
|
# FIXME: name is mandatory. Forcefully add it (we should really use the
|
||||||
# _actual_ name, but that isn't actually remembered at this point)
|
# _actual_ name, but that isn't actually remembered at this point)
|
||||||
if 'name' not in launch_config:
|
if 'name' not in launch_config:
|
||||||
launch_config[ 'name' ] = 'test'
|
launch_config[ 'name' ] = 'test'
|
||||||
|
|
||||||
self._connection.DoRequest( None, {
|
self._connection.DoRequest(
|
||||||
'command': launch_config[ 'request' ],
|
lambda msg: self._stackTraceView.LoadThreads( True ),
|
||||||
'arguments': launch_config
|
{
|
||||||
} )
|
'command': launch_config[ 'request' ],
|
||||||
|
'arguments': launch_config
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _UpdateBreakpoints( self, source, message ):
|
def _UpdateBreakpoints( self, source, message ):
|
||||||
if 'body' not in message:
|
if 'body' not in message:
|
||||||
|
|
@ -485,10 +493,11 @@ class DebugSession( object ):
|
||||||
self._codeView.AddBreakpoints( source, message[ 'body' ][ 'breakpoints' ] )
|
self._codeView.AddBreakpoints( source, message[ 'body' ][ 'breakpoints' ] )
|
||||||
self._codeView.ShowBreakpoints()
|
self._codeView.ShowBreakpoints()
|
||||||
|
|
||||||
|
|
||||||
def OnEvent_initialized( self, message ):
|
def OnEvent_initialized( self, message ):
|
||||||
self._SendBreakpoints()
|
self._SendBreakpoints()
|
||||||
self._connection.DoRequest(
|
self._connection.DoRequest(
|
||||||
lambda msg: self._stackTraceView.LoadThreads( True ),
|
lambda msg: self._Launch(),
|
||||||
{
|
{
|
||||||
'command': 'configurationDone',
|
'command': 'configurationDone',
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue