mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:44:27 +00:00
c4105d35db
This adds two custom requests to the DAP-over-DDS handler to translate between VM/DAP instance IDs: - $/createVariableForInstance (String isolateId, String instanceId) - $/getVariablesInstanceId (int variablesReference) Because DAP's variables request only fetches _child_ variables (eg. fields) but we'd likely want to align the top-level string display of a variable, the wrapped variable will first be returned as a single variable named "value", which contains both the string display value and also a variablesReference to then get the child variables (usually invoked when expanded). These methods currently live directly in the DDS DAP adapter since I figure they're only useful for clients using the VM Service, but we can move them to the base adapter if in future this turns out to not be the case. Change-Id: I60f28edd86c3468cc592175cb665557a1fc85056 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312987 Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
22 lines
528 B
Dart
22 lines
528 B
Dart
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// This script is used by tests in `test/dap_handler_test.dart`.
|
|
|
|
import 'dart:developer';
|
|
|
|
void main() async {
|
|
final myInstance = MyClass('myFieldValue');
|
|
debugger();
|
|
print(myInstance);
|
|
}
|
|
|
|
class MyClass {
|
|
final String myField;
|
|
|
|
MyClass(this.myField);
|
|
|
|
@override
|
|
String toString() => 'MyClass';
|
|
}
|