Very basic support for launch configuration

This change refactors the way we launch the job and puts it all in an
internal namespace. Having done that, we are able to launch the job from
the python side. This allows us to neatly load a json file, simlar in
format to .vscode's launch.json, but sufficiently different that users
won't just expect the launch.json to work.

This change allows selecting between 2 different adapters to debug the
same c program.
This commit is contained in:
Ben Jackson 2018-05-21 23:44:06 +01:00
commit 269d09b73e
8 changed files with 302 additions and 189 deletions

View file

@ -13,13 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
import vim
from vimspector import utils
_logger = logging.getLogger( __name__ )
class StackTraceView( object ):
def __init__( self, session, connection, buf ):
@ -59,10 +56,11 @@ class StackTraceView( object ):
stackFrames = message[ 'body' ][ 'stackFrames' ]
for frame in stackFrames:
source = frame[ 'source' ] or { 'name': '<unknown>' }
self._buf.append(
'{0}: {1}@{2}:{3}'.format( frame[ 'id' ],
frame[ 'name' ],
frame[ 'source' ][ 'name' ],
source[ 'name' ],
frame[ 'line' ] ) )
self._line_to_frame[ len( self._buf ) ] = frame