From 5ac4b94564115b9d8f4e56903030d876a01d6007 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Wed, 23 Dec 2015 21:56:54 +0100 Subject: [PATCH] add attribute "origin" to Source (fix #5) --- adapter/package.json | 4 ++-- adapter/src/debugSession.ts | 5 ++++- protocol/package.json | 2 +- protocol/src/debugProtocol.ts | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/adapter/package.json b/adapter/package.json index 11571bb..e4cac42 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -1,7 +1,7 @@ { "name": "vscode-debugadapter", "description": "Debug adapter implementation for node", - "version": "1.0.3", + "version": "1.0.4", "author": "Microsoft Corporation", "license": "MIT", "repository": { @@ -18,7 +18,7 @@ "typescript": "^1.6.2" }, "dependencies": { - "vscode-debugprotocol": "^1.0.0" + "vscode-debugprotocol": "^1.0.2" }, "scripts": { "prepublish": "tsc -p ./src", diff --git a/adapter/src/debugSession.ts b/adapter/src/debugSession.ts index fbcde41..f72dceb 100644 --- a/adapter/src/debugSession.ts +++ b/adapter/src/debugSession.ts @@ -16,10 +16,13 @@ export class Source implements DebugProtocol.Source { path: string; sourceReference: number; - public constructor(name: string, path: string, id: number = 0) { + public constructor(name: string, path: string, id: number = 0, origin?: string) { this.name = name; this.path = path; this.sourceReference = id; + if (origin) { + (this).origin = origin; + } } } diff --git a/protocol/package.json b/protocol/package.json index 4e3d891..3e00750 100644 --- a/protocol/package.json +++ b/protocol/package.json @@ -1,7 +1,7 @@ { "name": "vscode-debugprotocol", "description": "Npm module with declarations for the Visual Studio Code debug protocol", - "version": "1.0.1", + "version": "1.0.2", "author": "Microsoft Corporation", "license": "MIT", "repository": { diff --git a/protocol/src/debugProtocol.ts b/protocol/src/debugProtocol.ts index 20a594d..4d6511c 100644 --- a/protocol/src/debugProtocol.ts +++ b/protocol/src/debugProtocol.ts @@ -450,6 +450,8 @@ export module DebugProtocol { path?: string; /** If sourceReference > 0 the contents of the source can be retrieved through the SourceRequest. A sourceReference is only valid for a session, so it must not be used to persist a source. */ sourceReference?: number; + /** The (optional) origin of this source: possible values "internal module", "inlined content from source map" */ + origin?: string; } /** A Stackframe contains the source location. */