Skip to content

Debugger views include private getters which always fail if the current stack frame is from in the library that declares them #4296

Closed

Description

@Technorocker

Describe the bug
I am using VSCode to debug my flutter app. This may have been doing it for a long time. I'm new to debugging. but I noticed as im steeping through the code every variable has a property called _identityHashCode and instead of a value if I hover over it it says this.

<error: org-dartlang-debug:synthetic_debug_expression:1:1: Error: The getter '_identityHashCode' isn't defined for the class 'MethodChannelFirebase'.
 - 'MethodChannelFirebase' is from 'package:firebase_core_platform_interface/firebase_core_platform_interface.dart' ('/C:/Users/andre.viau/AppData/Local/Pub/Cache/hosted/pub.dev/firebase_core_platform_interface-4.5.2/lib/firebase_core_platform_interface.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named '_identityHashCode'.
_identityHashCode
^^^^^^^^^^^^^^^^^>

It says this for every variable it shows in the debug window. This isnt causing any crashes or anything that I am aware of yet.

To Reproduce
Steps to reproduce the behavior:

  1. Click on Run on the top bar and choose Start Debugging
  2. Go to the run and debug tab on the side of vscode and expand the "This": section to show the _identityHashCode property.
  3. Step through the code to show different variables.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
I have added a screenshot of the area this is showing me

Please complete the following information:

  • Operating System and version: Win 10 21H2
  • VS Code version: 1.73.1
  • Dart extension version: v3.54.1
  • Dart/Flutter SDK version: 2.19.0-374.0.dev
  • Target device (if the issue relates to Flutter debugging): android S10
    dart error

Activity

  1. DanTup commented on Dec 6, 2022

    @DanTup
    Member

    This error should be harmless, but I agree we should remove it. The original legacy debug adapters did filter this out:

    // Remove _identityHashCode because it seems to throw (and probably isn't useful to the user).
    return getterNames.filter((g) => g !== "_identityHashCode");

    However the new SDK debug adapters are missing this.

  2. added this to the v3.56.0 milestone on Dec 6, 2022
  3. added
    in debuggingRelates to the debug adapter or process of running debug sessions
    on Dec 6, 2022
  4. changed the title [-]The getter '_identityHashCode' isn't defined for the class 'MethodChannelFirebase'[/-] [+]Debugger views include private getters which always fail if the current stack frame is from in the library that declares them[/+] on Dec 6, 2022
  5. DanTup commented on Dec 8, 2022

    @DanTup
    Member

    Private getters will be filtered from this list from a future update (via dart-lang/sdk@c53f705). The change is in the SDK so it'll show up in a future SDK update (rather than a Dart-Code update).

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 debuggingRelates to the debug adapter or process of running debug sessionsis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions