Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 4 additions & 1 deletion src/object-dumper-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
- 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.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/object-dumper-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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'
};

Expand Down
1 change: 1 addition & 0 deletions src/object-dumper-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down