setLibraryDebuggable

29 views
Skip to first unread message

Devon Carew

unread,
Oct 15, 2015, 7:07:01 PM10/15/15
to observato...@dartlang.org
What does this default to for libraries? All are debuggable by default?

--
Devon Carew
Software Engineer
Google, Inc.

Todd Turnidge

unread,
Oct 15, 2015, 9:14:46 PM10/15/15
to Devon Carew, observato...@dartlang.org
All libraries are debuggable by default.  We should probably document this.

--
You received this message because you are subscribed to the Google Groups "Dart VM Observatory Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to observatory-dis...@dartlang.org.

Devon Carew

unread,
Oct 16, 2015, 11:33:56 AM10/16/15
to John McCutchan, Todd Turnidge, observato...@dartlang.org
I'm happy to set the configuration I want on connection. It would be good to document that clients shouldn't rely on any specific defaults.

FWIW, the settings I'll configure will be:
  • all libraries debuggable
  • break on uncaught exceptions
and will follow that up at some point with a way for the user to configure it.

I don't believe there is a way for clients to query the current pause mode; perhaps that call has not been documented? I do see the recent 'setExceptionPauseMode' call.


On Fri, Oct 16, 2015 at 7:14 AM, John McCutchan <jo...@johnmccutchan.com> wrote:
I'd rather not document any defaults because I worry about people writing service clients that have assumptions like this baked in. For example, what if the program was launched with some undocumented command line flag that flipped the default?

In other words, it's unsafe for the clients to assume the default because the default could be overridden by a command line flag (or have already been changed by some other service client).

It's trivial for a service client to determine whether a library is debuggable (similarly what an isolate's exception pause mode is- see other thread). Clients should be written in such a way that they query the state of the world rather than assuming any defaults. I think that's a more robust pattern to follow.

John

Devon Carew

unread,
Oct 16, 2015, 3:20:35 PM10/16/15
to John McCutchan, Todd Turnidge, observato...@dartlang.org
It's not critical - I plan on setting each isolate to break on exceptions as I get runnable isolate events - but I don't see the pause mode in the spec for class Isolate.

On Fri, Oct 16, 2015 at 9:10 AM, John McCutchan <jo...@johnmccutchan.com> wrote:

The exception pause mode is returned with the Isolate.

John

John McCutchan

unread,
Oct 18, 2015, 8:23:01 PM10/18/15
to Devon Carew, Todd Turnidge, observato...@dartlang.org
This is landed now. 

John

On Fri, Oct 16, 2015 at 12:24 PM John McCutchan <jo...@johnmccutchan.com> wrote:
Yep- I forgot to add it to the spec:

https://codereview.chromium.org/1408933004

John McCutchan

unread,
Oct 18, 2015, 8:23:01 PM10/18/15
to Devon Carew, Todd Turnidge, observato...@dartlang.org

The exception pause mode is returned with the Isolate.

John


On Fri, Oct 16, 2015, 8:33 AM Devon Carew <devon...@google.com> wrote:

John McCutchan

unread,
Oct 18, 2015, 8:23:01 PM10/18/15
to Devon Carew, Todd Turnidge, observato...@dartlang.org
Yep- I forgot to add it to the spec:

https://codereview.chromium.org/1408933004

On Fri, Oct 16, 2015 at 12:20 PM Devon Carew <devon...@google.com> wrote:

John McCutchan

unread,
Oct 18, 2015, 8:23:01 PM10/18/15
to Todd Turnidge, Devon Carew, observato...@dartlang.org
I'd rather not document any defaults because I worry about people writing service clients that have assumptions like this baked in. For example, what if the program was launched with some undocumented command line flag that flipped the default?

In other words, it's unsafe for the clients to assume the default because the default could be overridden by a command line flag (or have already been changed by some other service client).

It's trivial for a service client to determine whether a library is debuggable (similarly what an isolate's exception pause mode is- see other thread). Clients should be written in such a way that they query the state of the world rather than assuming any defaults. I think that's a more robust pattern to follow.

John

Reply all
Reply to author
Forward
0 new messages