Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Pass primitive variable type all the way through for microsoft/vscode…
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Oct 27, 2017
1 parent be6742b commit 0b8c804
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/chrome/chromeDebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,10 @@ export abstract class ChromeDebugAdapter implements IDebugAdapter {

public createPrimitiveVariable(name: string, object: Crdp.Runtime.RemoteObject, parentEvaluateName?: string, stringify?: boolean): DebugProtocol.Variable {
const value = variables.getRemoteObjectPreview_primitive(object, stringify);
return this.createPrimitiveVariableWithValue(name, value, parentEvaluateName);
const variable = this.createPrimitiveVariableWithValue(name, value, parentEvaluateName);
variable.type = object.type;

return variable;
}

public createPrimitiveVariableWithValue(name: string, value: string, parentEvaluateName?: string): DebugProtocol.Variable {
Expand Down
3 changes: 2 additions & 1 deletion test/chrome/chromeDebugAdapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ suite('ChromeDebugAdapter', () => {
result,
variablesReference,
indexedVariables: undefined,
namedVariables: undefined
namedVariables: undefined,
type: resultObj.type
};
}

Expand Down

0 comments on commit 0b8c804

Please sign in to comment.