From e3a1cd0043dc567f4c547878955a697f69b8c77c Mon Sep 17 00:00:00 2001 From: Joyce Er Date: Fri, 23 Oct 2020 15:40:30 -0700 Subject: [PATCH] Ask debug adapter for raw strings --- src/client/datascience/jupyter/debuggerVariables.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/client/datascience/jupyter/debuggerVariables.ts b/src/client/datascience/jupyter/debuggerVariables.ts index 9ed5db8b8aa4..50b849c518fd 100644 --- a/src/client/datascience/jupyter/debuggerVariables.ts +++ b/src/client/datascience/jupyter/debuggerVariables.ts @@ -118,7 +118,7 @@ export class DebuggerVariables extends DebugLocationTracker return results ? { ...targetVariable, - ...JSON.parse(results.result.slice(1, -1)) + ...JSON.parse(results.result) } : targetVariable; } @@ -158,7 +158,7 @@ export class DebuggerVariables extends DebugLocationTracker // tslint:disable-next-line: no-any (targetVariable as any).frameId ); - const chunkResults = JSON.parse(results.result.slice(1, -1)); + const chunkResults = JSON.parse(results.result); if (output && output.data) { output = { ...output, @@ -225,7 +225,8 @@ export class DebuggerVariables extends DebugLocationTracker const results = await this.debugService.activeDebugSession.customRequest('evaluate', { expression: code, frameId: this.topMostFrameId || frameId, - context: 'repl' + context: 'repl', + format: { rawString: true } }); if (results && results.result !== 'None') { return results; @@ -268,7 +269,7 @@ export class DebuggerVariables extends DebugLocationTracker return { ...variable, truncated: false, - ...JSON.parse(results.result.slice(1, -1)) + ...JSON.parse(results.result) }; } else { // If no results, just return current value. Better than nothing.