Fix local adapter specs
Somehow we lost the ability to define adapters in the local .vimspector.json, I think when GetConfigurations was added. Put that feature back.
This commit is contained in:
parent
4ac9785217
commit
8e2d352eb8
3 changed files with 18 additions and 5 deletions
|
|
@ -79,7 +79,7 @@ class DebugSession( object ):
|
|||
self._server_capabilities = {}
|
||||
self.ClearTemporaryBreakpoints()
|
||||
|
||||
def GetConfigurations( self ):
|
||||
def GetConfigurations( self, adapters ):
|
||||
current_file = utils.GetBufferFilepath( vim.current.buffer )
|
||||
filetypes = utils.GetBufferFiletypes( vim.current.buffer )
|
||||
configurations = {}
|
||||
|
|
@ -93,7 +93,8 @@ class DebugSession( object ):
|
|||
|
||||
with open( launch_config_file, 'r' ) as f:
|
||||
database = json.loads( minify( f.read() ) )
|
||||
configurations.update( database.get( 'configurations' or {} ) )
|
||||
configurations.update( database.get( 'configurations' ) or {} )
|
||||
adapters.update( database.get( 'adapters' ) or {} )
|
||||
|
||||
return launch_config_file, configurations
|
||||
|
||||
|
|
@ -109,8 +110,8 @@ class DebugSession( object ):
|
|||
self._adapter = None
|
||||
|
||||
current_file = utils.GetBufferFilepath( vim.current.buffer )
|
||||
launch_config_file, configurations = self.GetConfigurations()
|
||||
adapters = {}
|
||||
launch_config_file, configurations = self.GetConfigurations( adapters )
|
||||
|
||||
if not configurations:
|
||||
utils.UserMessage( 'Unable to find any debug configurations. '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue