Skip to content

When editing code remotely, dartdoc is not shown in hovers #5499

Closed

Description

@sigurdm

Here I edit a file locally, and hover an identifier. I get the associated dartdoc in the pop-up

Image

When I do the same in a remote folder I get the type, but no dartdoc:

Image

Diagnostics from local window:

Workspace Environment
Dart Code extension: 3.108.2

App: Visual Studio Code
App Host: desktop
Version: mac 1.99.3

Workspace type: Dart, Flutter (LSP)
Workspace name: blah

Dart (3.8.0-126.0.dev): /Users/sigurdm/projects/flutter/bin/cache/dart-sdk
Flutter (3.30.0-1.0.pre.266): /Users/sigurdm/projects/flutter (macOS (darwin/macos))

Output from 'dart info'

/Users/sigurdm/projects/flutter/bin/cache/dart-sdk/bin/dart info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

General info

  • Dart 3.8.0-126.0.dev (dev) (Thu Feb 20 20:02:14 2025 -0800) on "macos_arm64"
  • on macos / Version 15.4.1 (Build 24E263)
  • locale is en

Project info

  • sdk constraint: '>=3.3.0 <4.0.0'
  • dependencies: adaptive_theme, amazon_cognito_identity_dart_2, blurrycontainer, cupertino_icons, dart_jsonwebtoken, easy_sidemenu, envied, file_picker, fl_chart, flutter, flutter_gen_runner, flutter_hooks, flutter_riverpod, flutter_signin_button, flutter_svg, flutter_verification_code, flutter_web_plugins, go_router, google_fonts, hooks_riverpod, image_picker_web, intl, js, jwt_decoder, mask_text_input_formatter, openapi_generator_annotations, provider, responsive_framework, simple_logger, string_validator, super_tooltip, uuid, video_player_web
  • dev_dependencies: build_runner, envied_generator, flutter_test, go_router_builder, openapi_generator

Process info

Memory CPU Elapsed time Command line
25 MB 0.0% 08:07 dart devtools --machine --allow-embedding --dtd-uri ws:/YbfXGpw-cno=
68 MB 0.0% 08:07 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.108.2
27 MB 0.0% 08:07 dart tooling-daemon --machine
42 MB 0.0% 08:07 flutter_tools.snapshot daemon
Output from 'flutter doctor'

/Users/sigurdm/projects/flutter/bin/flutter doctor -v

[!] Flutter (Channel master, 3.30.0-1.0.pre.266, on macOS 15.4.1 24E263 darwin-arm64, locale en) [3.5s]
    • Flutter version 3.30.0-1.0.pre.266 on channel master at /Users/sigurdm/projects/flutter
    ! The flutter binary is not on your path. Consider adding /Users/sigurdm/projects/flutter/bin to your path.
    ! The dart binary is not on your path. Consider adding /Users/sigurdm/projects/flutter/bin to your path.
    • Upstream repository https://github.com/flutter/flutter
    • Framework revision b205b6b48a (9 weeks ago), 2025-02-21 05:24:24 -0500
    • Engine revision b205b6b48a
    • Dart version 3.8.0 (build 3.8.0-126.0.dev)
    • DevTools version 2.43.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✗] Android toolchain - develop for Android devices [72ms]
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✗] Xcode - develop for iOS and macOS [86ms]
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS and macOS development.
      Download at: https://developer.apple.com/xcode/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      For installation instructions, see https://guides.cocoapods.org/using/getting-started.html#installation

[✓] Chrome - develop for the web [32ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed) [32ms]
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).

[✓] VS Code (version 1.99.3) [32ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.108.0

[✓] Connected device (2 available) [109ms]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 15.4.1 24E263 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 135.0.7049.115

[✓] Network resources [878ms]
    • All expected network resources are available.

! Doctor found issues in 4 categories.
Diagnostics from remote window:
Workspace Environment
Dart Code extension: 3.108.2

App: Visual Studio Code
App Host: desktop
Remote: ssh-remote
Host Kind: ssh-remote
Version: linux 1.99.3

Workspace type: Dart, Flutter (LSP)
Workspace name: blah [SSH: elevator.c.googlers.com]

Dart (3.9.0-63.0.dev): /usr/local/google/home/sigurdm/projects/flutter/bin/cache/dart-sdk
Flutter (3.32.0-1.0.pre.296): /usr/local/google/home/sigurdm/projects/flutter (Linux (linux-x64/linux))

Output from 'dart info'

/usr/local/google/home/sigurdm/projects/flutter/bin/cache/dart-sdk/bin/dart info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

General info

Project info

  • sdk constraint: '>=2.12.0 <4.0.0'
  • dependencies: retry
  • dev_dependencies: test

Process info

Memory CPU Elapsed time Command line
66 MB 0.2% 03:01 dart devtools --machine --allow-embedding --dtd-uri ws:/JiOTPOUiwlg=
66 MB 0.0% 01:23:16 dart devtools --machine --allow-embedding --dtd-uri ws:/VlQgfmm16x8=
378 MB 0.1% 03:16:32 dart language-server --protocol=lsp --client-id=VS-Code-Remote --client-version=3.108.2
755 MB 0.2% 03:16:20 dart language-server --protocol=lsp --client-id=VS-Code-Remote --client-version=3.108.2
772 MB 2.1% 01:23:18 dart language-server --protocol=lsp --client-id=VS-Code-Remote --client-version=3.108.2
3935 MB 80.9% 03:03 dart language-server --protocol=lsp --client-id=VS-Code-Remote --client-version=3.108.2
76 MB 0.0% 03:16:33 dart tooling-daemon --machine
77 MB 0.0% 03:16:20 dart tooling-daemon --machine
82 MB 0.0% 01:23:18 flutter_tools.snapshot daemon --show-web-server-device
75 MB 0.3% 03:03 flutter_tools.snapshot daemon --show-web-server-device
Output from 'flutter doctor'

/usr/local/google/home/sigurdm/projects/flutter/bin/flutter doctor -v

[!] Flutter (Channel [user-branch], 3.32.0-1.0.pre.296, on Debian GNU/Linux rodete 6.12.17-1rodete2-amd64, locale en_US.UTF-8) [626ms]
    ! Flutter version 3.32.0-1.0.pre.296 on channel [user-branch] at /usr/local/google/home/sigurdm/projects/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! The flutter binary is not on your path. Consider adding /usr/local/google/home/sigurdm/projects/flutter/bin to your path.
    ! Warning: `dart` on your path resolves to /usr/local/google/home/sigurdm/.dvm/darts/3.7.0/bin/dart, which is not inside your current Flutter SDK checkout at /usr/local/google/home/sigurdm/projects/flutter. Consider adding /usr/local/google/home/sigurdm/projects/flutter/bin to the front of your path.
    ! Upstream repository https://github.com/sigurdm/flutter is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to https://github.com/sigurdm/flutter to dismiss this error.
    • Framework revision 8a037998e2 (80 minutes ago), 2025-04-28 12:51:02 +0000
    • Engine revision 0e595cc86d
    • Dart version 3.9.0 (build 3.9.0-63.0.dev)
    • DevTools version 2.45.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [4.7s]
    • Android SDK at /usr/local/google/home/sigurdm/Android/Sdk/
    • Emulator version 35.1.21.0 (build_id 12325540) (CL:N/A)
    • Platform android-35, build-tools 35.0.0
    • ANDROID_SDK_ROOT = /usr/local/google/home/sigurdm/Android/Sdk
    • Java binary at: /usr/local/google/home/sigurdm/Downloads/android-studio/jbr/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [601ms]
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop [2.6s]
    • Debian clang version 19.1.7 (1)
    • cmake version 3.31.5
    • ninja version 1.12.1
    • pkg-config version 1.8.1
    • OpenGL core renderer: llvmpipe (LLVM 19.1.7, 256 bits) (X11)
    • OpenGL core version: 4.5 (Core Profile) Mesa 24.3.4-3+build1 (X11)
    • OpenGL core shading language version: 4.50 (X11)
    • OpenGL ES renderer: llvmpipe (LLVM 19.1.7, 256 bits) (X11)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 24.3.4-3+build1 (X11)
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (X11)
    • GL_EXT_framebuffer_blit: yes (X11)
    • GL_EXT_texture_format_BGRA8888: yes (X11)

[✓] Android Studio (version 2024.1) [598ms]
    • Android Studio at /usr/local/google/home/sigurdm/Downloads/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /usr/local/google/home/sigurdm/Downloads/android-studio
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] IntelliJ IDEA Community Edition (version 2024.2) [596ms]
    • IntelliJ at /usr/local/google/home/sigurdm/Downloads/idea-IC-242.23726.103
    • Flutter plugin version 82.0.3
    • Dart plugin version 242.22855.32

[✓] IntelliJ IDEA Community Edition (version 2024.1) [378ms]
    • IntelliJ at /usr/local/google/home/sigurdm/Downloads/idea-IC-241.19416.15
    • Flutter plugin version 82.0.2
    • Dart plugin version 241.19416.15

[✓] IntelliJ IDEA Community Edition (version 2022.3) [197ms]
    • IntelliJ at /opt/intellij-ce-2022.3
    • Flutter plugin version 77.1.1
    • Dart plugin version 223.8977

[✓] VS Code (version unknown) [14ms]
    • VS Code at /usr/share/code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    ✗ Unable to determine VS Code version.

[✓] Connected device (2 available) [151ms]
    • Linux (desktop) • linux  • linux-x64      • Debian GNU/Linux rodete 6.12.17-1rodete2-amd64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 135.0.7049.114

[✓] Network resources [2.8s]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Activity

  1. DanTup commented on Apr 28, 2025

    @DanTup
    Member

    This is because of #4729. It was really targeted at completion, but applies anywhere we show documentation.

    It changes the default setting for documentation to "none" when in a remote workspace:

    // Set default documentation and maxCompletionItems based on whether we're running locally or not.
    // When running locally, payload size is less of an issue so we include full docs and a large list.
    if (isRunningLocally) {
    result.maxCompletionItems = result.maxCompletionItems ?? 100000;
    result.documentation = result.documentation ?? "full";
    } else {
    result.maxCompletionItems = result.maxCompletionItems ?? 1000;
    result.documentation = result.documentation ?? "none";
    }

    This means code completion doesn't include potentially megabytes of documentation you might never look at. It wasn't intended to affect hover though, and it's possible that we won't need it if we handle documentation using resolve (I'll need to check if we do this, I don't recall).

    As a temporary workaround, you can change the preference in your workspace (or user) settings:

    Image

  2. added this to the v3.112.0 milestone on Apr 28, 2025
  3. changed the title [-]When editing code remotely, dartdoc is not shown[/-] [+]When editing code remotely, dartdoc is not shown in hovers[/+] on Apr 28, 2025
  4. added
    in remoteRelates to running the extension in a remote setting using VS Code's remote dev support
    on Apr 28, 2025
  5. DanTup commented on May 27, 2025

    @DanTup
    Member

    I've some server changes in progress at https://dart-review.googlesource.com/c/sdk/+/431280 that will support per-request doc preferences. Once that's landed, I will adjust the defaults here so it's only completion that defaults to "none".

  6. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on May 27, 2025
  7. DanTup commented on May 28, 2025

    @DanTup
    Member

    After some discussion on the CL, we're changing how this works a little. Instead, the dart.documentation preference will now only apply to requests that return many results (like completion) and not requests that return single results (like hover, or signature help). This keeps things simpler and also resolves this issue.

  8. modified the milestones: v3.112.0, v3.114.0 on Jun 2, 2025
  9. DanTup commented on Jun 4, 2025

    @DanTup
    Member

    Fixed by dart-lang/sdk@0f161e3 (which unfortunately has a misleading commit message because I forgot to update it after changing what we did 🤦‍♂️).

    The change ships in a future SDK release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in remoteRelates to running the extension in a remote setting using VS Code's remote dev supportis bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions