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

Debugger doesn't show local field #17486

Closed
DartBot opened this issue Mar 14, 2014 · 5 comments
Closed

Debugger doesn't show local field #17486

DartBot opened this issue Mar 14, 2014 · 5 comments
Labels
closed-obsolete Closed as the reported issue is no longer relevant type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Mar 14, 2014

This issue was originally filed by @zoechi


What steps will reproduce the problem?
1.
@NgComponent(selector: 'my-comp', publishAs: 'ctrl', template:
    '<div>My component</div>')
class MyComponent {
  Http http;
  MyComponent(this.http) {
    //http.request('http://www.google.com/');
    var h = http;
    print(http.defaults.headers);
  }
}
2.
breakpoint on the print statement
3.

Debugger only shows
this | MyComponent [id=6]
   hashcode | 1056498558
hashcode | 1056498558
What is the expected output? What do you see instead?
I think the debugger should show the field http and it's content

What version of the product are you using? On what operating system?
Dart VM version: 1.3.0-dev.3.2 (Mon Mar 10 10:15:05 2014) on "linux_x64"

Please provide any additional information below.

@sgjesse
Copy link
Contributor

sgjesse commented Mar 17, 2014

Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

Matthias, it is not clear from this report whether this is even debugging in the VM or whether this is related to Dartium debugging. Can you please do a quick check to verify that the connecting to this kind of code from standalone does properly show all fields?


cc @jacob314.
Set owner to @mhausner.
Added Accepted label.

@DartBot
Copy link
Author

DartBot commented Apr 4, 2014

This comment was originally written by @mhausner


I modified the source a bit to replace type Http with a List:

     1
     2
     3 class MyComponent {
     4 List foo;
     5 MyComponent(this.foo) {
     6 var h = foo;
     7 print(foo.length);
     8 }
     9 }
    10
    11 main() {
    12 var x = new MyComponent(new List());
    13 print(x);
    14 }

Using the standalone debugger, I can break at the print statement in line 7 and list the stack trace.

sbp 7
Set BP 1
r
Breakpoint 1 resolved in isolate 575859754 at file: u.dart lib: 12 token: 26.
Breakpoint 1
    at u.dart:7
7 print(foo.length);
bt
#­0 MyComponent.MyComponent. at file: u.dart lib: 12 token: 26
  this = (obj, id 0) object of type MyComponent
  h = (list, id 1, len 0) []
#­1 main at file: u.dart lib: 12 token: 46
  x = (obj, id 2) null
#­2 isolateStartHandler at file: isolate_patch.dart lib: 8 token: 1277
  ignoreHandler = (closure _startIsolate.ignoreHandler(dynamic) => dynamic file: isolate_patch.dart lib: 8 token: 1100)
  keepAlivePort = (obj, id 4) object of type _RawReceivePortImpl
  isSpawnUri = true
  entryPoint = (closure main() => dynamic file: u.dart lib: 12 token: 37)
  message = (list, id 7, len 3) [null, [...], null]
  replyTo = (obj, id 2) null
  args = (list, id 8, len 1) [""]
  isolateMessage = (obj, id 2) null
#­3 _RawReceivePortImpl@0x2a486688._handleMessage@0x2a486688 at file: isolate_patch.dart lib: 8 token: 603
  port = (obj, id 9) object of type _RawReceivePortImpl
  message = (list, id 7, len 3) [null, [...], null]

inspecting the 'this' pointer in the top frame (object id 0) shows the instance field 'foo' (the equivalent of 'http' in the original code sample):

po 0
  class id: 1207
  foo = (list, id 1, len 0) []

So, the debugger core isn't hiding the instance field. I don't know how the Dartium debugger decides when to inspect an object and display its instance fields.


Removed the owner.
Removed Area-VM label.
Added Area-Dartium, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Apr 5, 2014

This comment was originally written by @zoechi


I deleted my previous comment, this was a misunderstanding. I hat this in the debugger included in DartEditor.

@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@mhausner mhausner added the closed-obsolete Closed as the reported issue is no longer relevant label Jan 24, 2017
@mhausner
Copy link
Contributor

The DartEditor is history. Other debuggers show the expected behavior. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-obsolete Closed as the reported issue is no longer relevant type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

5 participants