Merge branch 'master' into no_ssl

This commit is contained in:
Ben Jackson 2020-01-31 23:20:28 +00:00 committed by GitHub
commit 5eb042be14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 12 deletions

View file

@ -728,7 +728,7 @@ See [my fork of TclProDebug](https://github.com/puremourning/TclProDebug) for in
* C# - dotnet core
Requires `install_gadget.py --force-enable-c-sharp`
Requires `install_gadget.py --force-enable-csharp`
```json
{
@ -748,7 +748,7 @@ Requires `install_gadget.py --force-enable-c-sharp`
* C# - mono
Requires `install_gadget.py --force-enable-c-sharp`.
Requires `install_gadget.py --force-enable-csharp`.
***Known not to work.****

View file

@ -171,6 +171,12 @@ class DebugSession( object ):
# working directory.
'cwd': os.getcwd(),
}
# Pretend that vars passed to the launch command were typed in by the user
# (they may have been in theory)
USER_CHOICES.update( launch_variables )
self._variables.update( launch_variables )
self._variables.update(
utils.ParseVariables( adapter.get( 'variables', {} ),
self._variables,
@ -180,12 +186,6 @@ class DebugSession( object ):
self._variables,
USER_CHOICES ) )
# Pretend that vars passed to the launch command were typed in by the user
# (they may have been in theory)
# TODO: Is it right that we do this _after_ ParseVariables, rather than
# before ?
USER_CHOICES.update( launch_variables )
self._variables.update( launch_variables )
utils.ExpandReferencesInDict( configuration,
self._variables,
@ -268,7 +268,6 @@ class DebugSession( object ):
return fct(self, *args, **kwargs)
return wrapper
@IfConnected
def OnChannelData( self, data ):
self._connection.OnData( data )
@ -279,7 +278,6 @@ class DebugSession( object ):
self._outputView.Print( 'server', data )
@IfConnected
def OnRequestTimeout( self, timer_id ):
self._connection.OnRequestTimeout( timer_id )
@ -365,20 +363,25 @@ class DebugSession( object ):
def Pause( self ):
self._stackTraceView.Pause()
@IfConnected
def ExpandVariable( self ):
self._variablesView.ExpandVariable()
@IfConnected
def AddWatch( self, expression ):
self._variablesView.AddWatch( self._stackTraceView.GetCurrentFrame(),
expression )
@IfConnected
def EvaluateConsole( self, expression ):
self._outputView.Evaluate( self._stackTraceView.GetCurrentFrame(),
expression )
@IfConnected
def DeleteWatch( self ):
self._variablesView.DeleteWatch()
@IfConnected
def ShowBalloon( self, winnr, expression ):
"""Proxy: ballonexpr -> variables.ShowBallon"""
frame = self._stackTraceView.GetCurrentFrame()
@ -397,6 +400,7 @@ class DebugSession( object ):
# Return variable aware function
return self._variablesView.ShowBalloon( frame, expression )
@IfConnected
def ExpandFrameOrThread( self ):
self._stackTraceView.ExpandFrameOrThread()
@ -601,8 +605,10 @@ class DebugSession( object ):
self._outputView.RunJobWithOutput( 'Remote', cmd )
else:
if atttach_config[ 'pidSelect' ] == 'ask':
pid = utils.AskForInput( 'Enter PID to attach to: ' )
launch_config[ atttach_config[ 'pidProperty' ] ] = pid
prop = atttach_config[ 'pidProperty' ]
if prop not in launch_config:
pid = utils.AskForInput( 'Enter PID to attach to: ' )
launch_config[ prop ] = pid
return
elif atttach_config[ 'pidSelect' ] == 'none':
return

View file

@ -0,0 +1,13 @@
if argc() < 2
echom 'Usage:' v:argv[ 0 ] 'processName binary'
cquit!
endif
setfiletype cpp
call vimspector#LaunchWithSettings( #{
\ configuration: "C++ - Attach Local Process",
\ processName: argv( 0 ),
\ binary: argv( 1 ),
\ } )
1,2argd

View file

@ -0,0 +1,24 @@
{
"configurations": {
"C++ - Attach Local Process": {
"adapter": "vscode-cpptools",
"variables": {
"PID": {
"shell": [ "GetPIDForProcess", "${processName}" ]
}
},
"configuration": {
"name": "test",
"request": "attach",
"program": "${binary}",
"processId": "${PID}",
"type": "cppdbg",
"stopAtEntry": true,
"setupCommands": [
{ "text": "source ${initFile}", "ignoreFailures": true }
]
}
}
}
}