webdev returns an internal server error when setting breakpoints on file path script uris
- Dominant language
- Dart
- Stars
- 224
- Forks
- 94
- Avg merge
- 7h 14m
- Merged PRs (30d)
- 2
Description
webdev returns an internal server error when setting breakpoints on file path script uris. Note that this isn't an issue for IntelliJ - I'm updating our code base to no longer try and set breakpoints by file path (just via dart:, package:, and file: uris). But I noticed that package:dwds throws an exception here - it should probably fail more gracefully.
```
==> {"jsonrpc":"2.0","id":"43","method":"addBreakpointWithScriptUri","params":{"isolateId":"1","scriptUri":"/Users/devoncarew/IdeaProjects/foo_flutter/lib/main.dart","line":9}}
```
```
<== {"jsonrpc":"2.0","error":{"code":-32603,"message":
"NoSuchMethodError: The getter 'id' was called on null.
Receiver: null
Tried calling: id
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)\n
#1 ChromeProxyService.addBreakpointWithScriptUri (package:dwds/src/services/chrome_proxy_service.dart:223:39)\n\n
#2 VmServerConnection._delegateRequest (package:vm_service/vm_service.dart:932:51)\n\n
#3 _rootRunUnary (dart:async/zone.dart:1132:38)\n
#4 _CustomZone.runUnary (dart:async/zone.dart:1029:19)\n
#5 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)\n
#6 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)\n
#7 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)\n
#8 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:132:11)\n
#9 _MapStream._handleData (dart:async/stream_pipe.dart:232:10)\n
#10 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:164:13)\n
...
```
Contributor guide
Research direction
Start at package dwds/src/services/chrome_proxy_service.dart:223 and reproduce the addBreakpointWithScriptUri request with the file-path URI shown. Trace how the script lookup handles a missing result, then verify the request returns a graceful response or error instead of NoSuchMethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100