diff --git a/src/ObjectDumper/InjectableLibs/net45/YellowFlavor.Serialization.dll b/src/ObjectDumper/InjectableLibs/net45/YellowFlavor.Serialization.dll index 8cd9369..997533e 100644 Binary files a/src/ObjectDumper/InjectableLibs/net45/YellowFlavor.Serialization.dll and b/src/ObjectDumper/InjectableLibs/net45/YellowFlavor.Serialization.dll differ diff --git a/src/ObjectDumper/InjectableLibs/net6.0/YellowFlavor.Serialization.dll b/src/ObjectDumper/InjectableLibs/net6.0/YellowFlavor.Serialization.dll index db38369..9a6a9d4 100644 Binary files a/src/ObjectDumper/InjectableLibs/net6.0/YellowFlavor.Serialization.dll and b/src/ObjectDumper/InjectableLibs/net6.0/YellowFlavor.Serialization.dll differ diff --git a/src/ObjectDumper/InjectableLibs/netcoreapp2.0/YellowFlavor.Serialization.dll b/src/ObjectDumper/InjectableLibs/netcoreapp2.0/YellowFlavor.Serialization.dll index c3c4e6c..eeda925 100644 Binary files a/src/ObjectDumper/InjectableLibs/netcoreapp2.0/YellowFlavor.Serialization.dll and b/src/ObjectDumper/InjectableLibs/netcoreapp2.0/YellowFlavor.Serialization.dll differ diff --git a/src/ObjectDumper/InjectableLibs/netcoreapp3.1/YellowFlavor.Serialization.dll b/src/ObjectDumper/InjectableLibs/netcoreapp3.1/YellowFlavor.Serialization.dll index 0319091..6a3cdae 100644 Binary files a/src/ObjectDumper/InjectableLibs/netcoreapp3.1/YellowFlavor.Serialization.dll and b/src/ObjectDumper/InjectableLibs/netcoreapp3.1/YellowFlavor.Serialization.dll differ diff --git a/src/ObjectDumper/InjectableLibs/netstandard2.0/YellowFlavor.Serialization.dll b/src/ObjectDumper/InjectableLibs/netstandard2.0/YellowFlavor.Serialization.dll index 486e5b2..1fd86af 100644 Binary files a/src/ObjectDumper/InjectableLibs/netstandard2.0/YellowFlavor.Serialization.dll and b/src/ObjectDumper/InjectableLibs/netstandard2.0/YellowFlavor.Serialization.dll differ diff --git a/src/object-dumper-vscode/CHANGELOG.md b/src/object-dumper-vscode/CHANGELOG.md index abdd472..15d0e18 100644 --- a/src/object-dumper-vscode/CHANGELOG.md +++ b/src/object-dumper-vscode/CHANGELOG.md @@ -92,4 +92,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how - Update YellowFlavor.Serialization lib to v 0.0.0.96 (pass all the parameters as a single base64 encoded string). ## [0.0.26] -- Update VarDump to v 0.2.16 (Fix the cicrular reference detection - remove lazy behavior, regression in VarDump 0.2.13). \ No newline at end of file +- Update VarDump to v 0.2.16 (Fix the cicrular reference detection - remove lazy behavior, regression in VarDump 0.2.13). + +## [0.0.27] +- Fix the [Stack frame not found](https://github.com/ycherkes/ObjectDumper/issues/81) issue. \ No newline at end of file diff --git a/src/object-dumper-vscode/injectable_libraries/netstandard2.0/YellowFlavor.Serialization.dll b/src/object-dumper-vscode/injectable_libraries/netstandard2.0/YellowFlavor.Serialization.dll index 486e5b2..1fd86af 100644 Binary files a/src/object-dumper-vscode/injectable_libraries/netstandard2.0/YellowFlavor.Serialization.dll and b/src/object-dumper-vscode/injectable_libraries/netstandard2.0/YellowFlavor.Serialization.dll differ diff --git a/src/object-dumper-vscode/package.json b/src/object-dumper-vscode/package.json index 240a819..a070c06 100644 --- a/src/object-dumper-vscode/package.json +++ b/src/object-dumper-vscode/package.json @@ -3,7 +3,7 @@ "displayName": "Object Dumper", "description": "Extension for exporting in-memory objects during debugging to C#, JSON, VB, XML, and YAML string.", "publisher": "YevhenCherkes", - "version": "0.0.26", + "version": "0.0.27", "repository": { "url": "https://github.com/ycherkes/ObjectDumper" }, diff --git a/src/object-dumper-vscode/src/debuggee_interaction/expressionEvaluator.ts b/src/object-dumper-vscode/src/debuggee_interaction/expressionEvaluator.ts index f0015e1..7671d2c 100644 --- a/src/object-dumper-vscode/src/debuggee_interaction/expressionEvaluator.ts +++ b/src/object-dumper-vscode/src/debuggee_interaction/expressionEvaluator.ts @@ -2,6 +2,27 @@ import * as vscode from 'vscode'; export class ExpressionEvaluator{ + private frameId: number = 1000; + + public initialize(){ + var onDidSendMessageMethod = this.onDidSendMessage; + vscode.debug.registerDebugAdapterTrackerFactory("coreclr", { + createDebugAdapterTracker(_session: vscode.DebugSession) { + return { + onDidSendMessage: onDidSendMessageMethod + }; + }, + }); + } + + private onDidSendMessage(m: any){ + if (m.success && m.command === 'stackTrace') { + if (m.body?.stackFrames && m.body.stackFrames.length > 0) { + this.frameId = m.body.stackFrames[0].id; + } + } + } + public async evaluateExpression(expression: string): Promise<[value: string, isValidValue: boolean]> { const debugSession = vscode.debug.activeDebugSession; @@ -12,13 +33,11 @@ export class ExpressionEvaluator{ return ["", false]; } - const frameId = 1000; - - // Context: 'clipboard' will never truncate the response, see https://github.com/microsoft/vscode-js-debug/issues/689#issuecomment-669257847 + // Context: 'clipboard' will never truncate the response, see https://github.com/microsoft/vscode-js-debug/issues/689#issuecomment-669257847 const args = { expression: expression, - frameId: frameId, + frameId: this.frameId, context: 'clipboard' }; diff --git a/src/object-dumper-vscode/src/extension.ts b/src/object-dumper-vscode/src/extension.ts index ec5ab76..06e8a54 100644 --- a/src/object-dumper-vscode/src/extension.ts +++ b/src/object-dumper-vscode/src/extension.ts @@ -11,6 +11,7 @@ import * as fs from 'fs'; export async function activate(context: vscode.ExtensionContext) { const expressionEvaluator = new ExpressionEvaluator(); + expressionEvaluator.initialize(); const expressionProvider = new CSharpExpressionProvider(); const optionsProvider = new OptionsProvider(); const interactionService = new InteractionService(expressionEvaluator, optionsProvider, context.extensionPath, expressionProvider);