dart-lang / dart-lang/webdev

unify RemoteDebugger exception handing

Open
#988 0 comments 0 reactions 0 assignees View on GitHub
package:dwds
Dominant language
Dart
Stars
224
Forks
94
Avg merge
7h 14m
Merged PRs (30d)
2

Description

The two RemoteDebugger implementations - the package:webkit_inspector_protocol one and the chrome extension one - have different behavior when there are errors w/ debugger calls.

package:webkit_inspector_protocol throws a WipError instance.

The chrome extension debugger returns the raw json from the result, and call sites need to check that json for an `error` field (`handleErrorIfPresent()`).

I think we need to change the extension debugger impl to throw, delete the `handleErrorIfPresent()` function, make a pass though all the call sites - places where we'd called handleErrorIfPresent() - to make sure the error handling all makes sense.

Contributor guide

Open the contributing guide

Research direction

Locate the two RemoteDebugger implementations: package:webkit_inspector_protocol and the Chrome extension debugger. Start by tracing handleErrorIfPresent() and every call site, then compare how each implementation reports debugger-call errors. Done means the extension path follows the throwing behavior, the helper is removed, and all affected call sites still handle errors correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
devtools
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.