Alow env and cwd to be specified for the _adapter_
This commit is contained in:
parent
c44e0970a4
commit
f1859639d7
2 changed files with 11 additions and 0 deletions
|
|
@ -368,6 +368,15 @@ class DebugSession( object ):
|
|||
port = utils.AskForInput( 'Enter port to connect to: ' )
|
||||
self._adapter[ 'port' ] = port
|
||||
|
||||
# TODO: Do we actually need to copy and update or does Vim do that?
|
||||
env = os.environ.copy()
|
||||
if 'env' in self._adapter:
|
||||
env.update( self._adapter[ 'env' ] )
|
||||
self._adapter[ 'env' ] = env
|
||||
|
||||
if 'cwd' not in self._adapter:
|
||||
self._adapter[ 'cwd' ] = os.getcwd()
|
||||
|
||||
channel_send_func = vim.bindeval(
|
||||
"vimspector#internal#{}#StartDebugSession( {} )".format(
|
||||
self._connection_type,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue