dart-archive / vm_service_client

A Darty client for the VM service protocol
https://pub.dev/packages/vm_service_client
BSD 3-Clause "New" or "Revised" License
12 stars 19 forks source link

Add support for setExceptionPauseMode #38

Closed DanTup closed 6 years ago

DanTup commented 6 years ago

This adds a method to Isolate to set the exception mode and a test for each mode.

Fixes #37.

DanTup commented 6 years ago

(I believe the Travis failure is because the tests are just broken in the latest SDKs. I ran against an older SDK and all is good. I think @kevmoo was setting this up recently and it's still WIP).

nex3 commented 6 years ago

One other thing: please make sure all the APIs you add document the version of the protocol in which they first appear.

DanTup commented 6 years ago

I've added the ability to get the pause mode and an additional test. Also added to changelog and updated version (I'll merge this with the other PR if they're landed around the same time).

@nex3 The test for the getter currently calls toString() since the VMExceptionPauseMode instances are different. Let me know if you'd prefer this was done another way (I was thinking a factory constructor could use the string to return the same instances, or we could override equality - not really sure what the usual done thing is in Dart).

One other thing: please make sure all the APIs you add document the version of the protocol in which they first appear.

As far as I can tell from the docs, exceptionPauseMode has always been there (it's not in the changelog), though the stuff in the other PR is new, so I'll go back and update that one.

DanTup commented 6 years ago

(btw, someone will need to merge this when happy with it as I don't have merge permissions here)

DanTup commented 6 years ago

I've rebased on master since the version number I used has been used in master now. Lmk if you'd like any further changes.