Skip to content

Commit

Permalink
add attribute "origin" to Source (fix #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed Dec 23, 2015
1 parent 924d9cf commit 5ac4b94
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions adapter/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -18,7 +18,7 @@
"typescript": "^1.6.2"
},
"dependencies": {
"vscode-debugprotocol": "^1.0.0"
"vscode-debugprotocol": "^1.0.2"
},
"scripts": {
"prepublish": "tsc -p ./src",
Expand Down
5 changes: 4 additions & 1 deletion adapter/src/debugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
(<any>this).origin = origin;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion protocol/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 2 additions & 0 deletions protocol/src/debugProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 5ac4b94

Please sign in to comment.