Skip to content

VS Code / Dart - Variable inspector shows error string #3836

@sunilguptasg

Description

@sunilguptasg

Describe the bug
I am unable to inspect variables. Only see "<function errorString(error) {>"

To Reproduce
The method that is causing the issue is here:

  dynamic sendRequest(String remoteFileName, String method, XFile file, int length) async {
    final uri = Uri(path: baseURL + '/' + nameOfZone + '/' + Uri.encodeFull(remoteFileName));
    final req = http.MultipartRequest(method, uri);

    var s = await file.readAsBytes();
    String baseName = basename(file.path);

    final multipartFile = http.MultipartFile('picture', http.ByteStream.fromBytes(s), length, filename: baseName);

    req.files.add(multipartFile);

    req.fields['User-Agent'] = 'Java-BCDN-Client-' + version;
    req.fields['AccessKey'] = apiKey;
    req.fields['Content-Type'] = 'application/octet-stream';

    switch (method) {
      case "PUT":
        final res = await req.send();
        await for (var value in res.stream.transform(utf8.decoder)) {
          debugPrint(value);
        }
        break;
    }
  }

Expected behavior
I should be able to inspect the variables

Screenshots
Screenshot 2022-02-18_17-48-34-534

Versions (please complete the following information):
[✓] Flutter (Channel stable, 2.10.1, on macOS 12.1 21C52 darwin-arm, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.64.2)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions