Danny Tuppeny
2017-08-04 10:28:05 UTC
Hi all,
I'm after some opinions.. I've been (finally!) writing some Dart recently
and while debugging noticed that in the debugger tooltips when I hover over
objects that only fields appear, not properties/getters. This has been a
bit of a pain for me, since I'm not familiar with the data structures I'm
debugging and they're immutable so most of the data is in getters and not
fields - I just can't examine the objects usefully to see the data. For
example - this node object has getters for things like beginToken, endToken
that are not visible here.
<Loading Image...
>
I had a quick look through the Dart issue tracker and found a couple of
discussions about this and it seems like the reason is because the debugger
doesn't want to invoke any code that could cause side effects. This seems
reasonable in many ways, but it bugs me a little because a) it makes
debugging a pain and b) languages like C# execute getters by default and
it's rarely caused me/my colleagues any problems.
In an attempt to address it, I hoped to maybe add something in the debug UI
in Dart Code that would list the getters without their values and allow the
user to click/expand them to invoke them and get the values. However, it
seems like there's no support for this currently and MS aren't interested
in adding it (they suggest it's more an IDE feature and want to be a
lightweight editor).
So, to help my decide what to do, I'm after some opinions/info! For example:
- What do other IDEs do here?
- How bad do you think it'd be if I just invoked getters during
debugging?
- If I had an setting to toggle this (but if you have it off, you can't
invoke them ad-hoc except by typing in the debug console) would that be
useful?
- If I had a setting; do you think it would be bad to default it to on?
Thanks!
I'm after some opinions.. I've been (finally!) writing some Dart recently
and while debugging noticed that in the debugger tooltips when I hover over
objects that only fields appear, not properties/getters. This has been a
bit of a pain for me, since I'm not familiar with the data structures I'm
debugging and they're immutable so most of the data is in getters and not
fields - I just can't examine the objects usefully to see the data. For
example - this node object has getters for things like beginToken, endToken
that are not visible here.
<Loading Image...
I had a quick look through the Dart issue tracker and found a couple of
discussions about this and it seems like the reason is because the debugger
doesn't want to invoke any code that could cause side effects. This seems
reasonable in many ways, but it bugs me a little because a) it makes
debugging a pain and b) languages like C# execute getters by default and
it's rarely caused me/my colleagues any problems.
In an attempt to address it, I hoped to maybe add something in the debug UI
in Dart Code that would list the getters without their values and allow the
user to click/expand them to invoke them and get the values. However, it
seems like there's no support for this currently and MS aren't interested
in adding it (they suggest it's more an IDE feature and want to be a
lightweight editor).
So, to help my decide what to do, I'm after some opinions/info! For example:
- What do other IDEs do here?
- How bad do you think it'd be if I just invoked getters during
debugging?
- If I had an setting to toggle this (but if you have it off, you can't
invoke them ad-hoc except by typing in the debug console) would that be
useful?
- If I had a setting; do you think it would be bad to default it to on?
Thanks!
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.