Skip to content

in VSCode when i open devtools and select widget mode and select widget on screen ... don't open widget file location #6876

Closed

Description

@MoRmdn

<-- Please describe your problem here. Be sure to include repro steps. -->


DevTools version: 2.28.3
IDE: VSCode
Connected Device:
CPU / OS: x64 (64 bit) android
Connected app type: Flutter native (debug build)
Dart Version: 3.2.2
Flutter Version: 3.16.2 / stable
Framework / Engine: 9e1c857886 / cf7a9d0800

Activity

  1. kenzieschmoll commented on Dec 1, 2023

    @kenzieschmoll
    Member

    @DanTup This is the latest DevTools version on flutter stable. Any idea why this might be broken?

  2. DanTup commented on Dec 2, 2023

    @DanTup
    Contributor

    @MoRmdn are you running using F5 / Run -> Start Debugging or Ctrl+F5/Run -> Start Without Debugging?

    When you run without debugging, we don't connect the debugger to the VM Service, so the editor won't have this kind of functionality. You'll need to run in debug mode for this to work.

    In older versions of Flutter (using the legacy debug adapters), we did always connected to the VM so this might have worked in the past, but it was accidental (and different between Dart/Flutter). The new debug adapters are consistent between Dart/Flutter and will only have a connection to the VM when debugging.

    This might change a little in future though, as some functionality may move to a new process (the Dart Tooling Daemon), which may allow us to communication between tools even when there's no connection between the debugger and the VM.

  3. heshesh2010 commented on Dec 9, 2023

    @heshesh2010

    @DanTup I have same issue with flutter 3.16 using debug mode ,

    vscode lunch file

        {
            "name": "Flutter (hesham’s iPhone)",
            "program": "lib/main.dart",
            "deviceId": "00008120-000819A21A70201E",
            "request": "launch",
            "type": "dart",
            "flutterMode": "debug"
        }
    

    also i'm running on debug mode

    Screenshot 2023-12-09 at 2 12 55 PM

    I have the same issue + other issue when first select text widget for example it works , but when i toggle and return to toggle again it forces me to select the same previous text widget i can't select any other widget , unless i clicked on search icon in bottom left side of screen so it works , but in android the android navigation bar is overlap this icon so it's very hard to click on it .

  4. DanTup commented on Dec 9, 2023

    @DanTup
    Contributor

    but when i toggle and return to toggle again it forces me to select the same previous text widget i can't select any other widget , unless i clicked on search icon

    @jacob314 @kenzieschmoll is this intended functionality? As long as I can remember I've had to click on the magnifying glass in the bottom left on the device after selecting a widget before I can select another. I assumed this was expected, though I'm not sure.

  5. DanTup commented on Dec 9, 2023

    @DanTup
    Contributor

    I just tested this using Flutter stable with DevTools outside of VS Code, and I see this same behaviour. Each time I select a widget I need to click the magnifying glass before I can select another:

    inspect.mp4

    I think this is different to the original issue here, which is that with the latest release in VS Code the navigation only worked in "Debug" mode. The pre-release version of the Dart extension fixes this and will be patched to the stable extension next week.

  6. xaakib commented on Dec 9, 2023

    @xaakib

    DanTup it is working widget tree not code tab , we need to fix that when we select device widget then it will working on widget tree and code tab which code we selected in device .

  7. DanTup commented on Dec 9, 2023

    @DanTup
    Contributor

    @xaakib Yes, there seem to be two different issues noted above. One is that code navigation is not occurring when not using Debug mode - that is fixed in the Pre-release Dart extension (see my response at #6892 (comment)).

    The other issue noted was that selecting widgets only works the first time - that's what my video shows, but I believed that to be by design. Hopefully Jacob or Kenzie can confirm if that's the case or not.

  8. xaakib commented on Dec 9, 2023

    @xaakib

    yes, thank you very much, it's now worked clearly.

  9. DanTup commented on Dec 11, 2023

    @DanTup
    Contributor

    The issue of the inspector not navigating correctly is resolved in v3.78.2 of the Dart extension. Please update and click the "Reload" button if prompted.

    image

    image

  10. kenzieschmoll commented on Dec 12, 2023

    @kenzieschmoll
    Member

    The other issue noted was that selecting widgets only works the first time - that's what my video shows, but I believed that to be by design. Hopefully Jacob or Kenzie can confirm if that's the case or not.

    This is by design (although it is a design that we want to revisit soon to make this more intuitive). When select widget mode is enabled, you can select a widget on the device, but then to select another, you need to first click on the magnifying glass icon in the lower right corner.

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

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