Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot evaluate private members in other libraries from debugging tools #13811

Open
blois opened this issue Oct 3, 2013 · 11 comments
Open

Cannot evaluate private members in other libraries from debugging tools #13811

blois opened this issue Oct 3, 2013 · 11 comments
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@blois
Copy link
Contributor

blois commented Oct 3, 2013

At a breakpoint in a library method of a type which is subclassed in a separate library, I cannot evaluate private fields.

Getting the error:
"Unhandled exception:
Class 'TodoApp' has no instance getter '_declaration@0x2cb85f65'.

NoSuchMethodError : method not found: '_declaration@0x2cb85f65'
Receiver: Instance of 'TodoApp'
Arguments: []
# ­0      Object.noSuchMethod (dart:core-patch/object_patch.dart:42)
# ­1      TodoApp.eval.<anonymous closure> (:2:1)
# ­2      Object.noSuchMethod (dart:core-patch/object_patch.dart:42)
# ­3      HtmlElement&Polymer.observeProperties (package:polymer/src/instance.dart:460:34)
# ­4      HtmlElement&Polymer.prepareElement (package:polymer/src/instance.dart:149:22)
# ­5      HtmlElement&Polymer.initialize (package:polymer/src/instance.dart:141:21)
# ­6      PolymerElement.PolymerElement.created (package:polymer/src/instance.dart:931:15)
# ­7      TodoApp.TodoApp.created (http://blois.sea.corp.google.com:9898/dart/samples/third_party/todomvc/web/app.dart:18:23)
# ­8      Node.dispatchEvent (file:///mnt/data/b/build/slave/dartium-lucid64-inc-be/build/src/out/Release/gen/blink/bindings/dart/dart/html/Node.dart:469)
# ­9      initPolymer.<anonymous closure> (package:polymer/src/loader.dart:48:32)
# ­10     runMicrotask.<anonymous closure> (package:observe/src/microtask.dart:65:16)
# ­11     _rootRun (dart:async/zone.dart:536)
# ­12     _ZoneDelegate.run (dart:async/zone.dart:344)
# ­13     _CustomizedZone.run (dart:async/zone.dart:489)
# ­14     runZonedExperimental (dart:async/zone.dart:732)
# ­15     runMicrotask (package:observe/src/microtask.dart:63:45)
# ­16     initPolymer (package:polymer/src/loader.dart:33:15)
# ­17     main (http://blois.sea.corp.google.com:9898/dart/samples/third_party/todomvc/web/index.html:8:22)
# ­18     TodoApp.eval.<anonymous closure> (:2:1)
# ­19     Object.noSuchMethod (dart:core-patch/object_patch.dart:42)
# ­20     HtmlElement&Polymer.observeProperties (package:polymer/src/instance.dart:460:34)
# ­21     HtmlElement&Polymer.prepareElement (package:polymer/src/instance.dart:149:22)
# ­22     HtmlElement&Polymer.initialize (package:polymer/src/instance.dart:141:21)
# ­23     PolymerElement.PolymerElement.created (package:polymer/src/instance.dart:931:15)
# ­24     TodoApp.TodoApp.created (http://blois.sea.corp.google.com:9898/dart/samples/third_party/todomvc/web/app.dart:18:23)
# ­25     Node.dispatchEvent (file:///mnt/data/b/build/slave/dartium-lucid64-inc-be/build/src/out/Release/gen/blink/bindings/dart/dart/html/Node.dart:469)
# ­26     initPolymer.<anonymous closure> (package:polymer/src/loader.dart:48:32)
# ­27     runMicrotask.<anonymous closure> (package:observe/src/microtask.dart:65:16)
# ­28     _rootRun (dart:async/zone.dart:536)
# ­29     _ZoneDelegate.run (dart:async/zone.dart:344)
# ­30     _CustomizedZone.run (dart:async/zone.dart:489)
# ­31     runZonedExperimental (dart:async/zone.dart:732)
# ­32     runMicrotask (package:observe/src/microtask.dart:63:45)
# ­33     initPolymer (package:polymer/src/loader.dart:33:15)
# ­34     main (http://blois.sea.corp.google.com:9898/dart/samples/third_party/todomvc/web/index.html:8:22)"
@vsmenon
Copy link
Member

vsmenon commented Nov 14, 2013

Is still an issue?


Added this to the M9 milestone.

@blois
Copy link
Contributor Author

blois commented Nov 14, 2013

I believe this is fixed with the package selector mechanism

@vsmenon
Copy link
Member

vsmenon commented Nov 14, 2013

Removed this from the M9 milestone.
Added this to the 1.1 milestone.

@jacob314
Copy link
Member

This is still an issue.

@vsmenon
Copy link
Member

vsmenon commented Feb 27, 2014

Removed this from the 1.1 milestone.
Added this to the 1.3 milestone.

@vsmenon
Copy link
Member

vsmenon commented Jun 4, 2014

Removed this from the 1.3 milestone.
Added this to the 1.6 milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@jacob314 jacob314 removed their assignment Aug 19, 2019
@jacob314 jacob314 reopened this Aug 19, 2019
@jacob314
Copy link
Member

Now that the Dart Dev Compiler and the Dart VM are both running with the CFE we should investigate solving this issue.

DDC had a reasonable solution using dloadRepl and replNameLookup helpers to evaluate private members where possible. It would be great to have an option in the CFE to perform resolution of privates in a repl friendly manner permitting privates from all libraries. In the static case the CFE would resolve to the appropriate private and in the dynamic case DDC and the DartVM would need to have a fallback slow path like dloadRepl that throws an exception if an object has more than one private member with the name and otherwise invokes the private even though it is from a different library.

In practice, very few privates are defined in multiple objects on the same library so most of the time invoking privates just works with this solution. In the rare case it doesn't. users get a reasonable error explaining why it was not permitted.

@jacob314 jacob314 changed the title Cannot inspect private members in other libraries Cannot evaluate private members in other libraries from debugging tools Aug 19, 2019
@jacob314
Copy link
Member

This issue recently came up on dart-misc
https://groups.google.com/a/dartlang.org/forum/#!topic/misc/0-Ga6Xy_WX4

@jacob314
Copy link
Member

Fyi @alan-knight who now owns eval support for the Dart Dev Compiler.

@a-siva a-siva added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

7 participants