Skip to content

Commit a8ea839

Browse files
authored
Ask debug adapter for raw strings (#14501)
1 parent d63031c commit a8ea839

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/client/datascience/jupyter/debuggerVariables.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export class DebuggerVariables extends DebugLocationTracker
118118
return results
119119
? {
120120
...targetVariable,
121-
...JSON.parse(results.result.slice(1, -1))
121+
...JSON.parse(results.result)
122122
}
123123
: targetVariable;
124124
}
@@ -158,7 +158,7 @@ export class DebuggerVariables extends DebugLocationTracker
158158
// tslint:disable-next-line: no-any
159159
(targetVariable as any).frameId
160160
);
161-
const chunkResults = JSON.parse(results.result.slice(1, -1));
161+
const chunkResults = JSON.parse(results.result);
162162
if (output && output.data) {
163163
output = {
164164
...output,
@@ -225,7 +225,8 @@ export class DebuggerVariables extends DebugLocationTracker
225225
const results = await this.debugService.activeDebugSession.customRequest('evaluate', {
226226
expression: code,
227227
frameId: this.topMostFrameId || frameId,
228-
context: 'repl'
228+
context: 'repl',
229+
format: { rawString: true }
229230
});
230231
if (results && results.result !== 'None') {
231232
return results;
@@ -268,7 +269,7 @@ export class DebuggerVariables extends DebugLocationTracker
268269
return {
269270
...variable,
270271
truncated: false,
271-
...JSON.parse(results.result.slice(1, -1))
272+
...JSON.parse(results.result)
272273
};
273274
} else {
274275
// If no results, just return current value. Better than nothing.

0 commit comments

Comments
 (0)