dart-lang / dart-lang/webdev

Improve error message when failing to add a breakpoint to a script that isn't loaded

Open
#2,664 1 comment 1 reaction 1 assignee Claimed by @Markzipan View on GitHub
P2 package:dwds triaged
Dominant language
Dart
Stars
224
Forks
94
Avg merge
4d 3h
Merged PRs (30d)
2

Description

Moving this from https://github.com/Dart-Code/Dart-Code/issues/5632 (filed by @oliver-whale).

If you add a breakpoint to a file that is not called, the error that comes back looks like this:

Image

I wonder if this could be improved given that it is surfaced to the user as the reason their breakpoint wasn't set? For example:

- it's quite long and the prefix "Unexpected DWDS error for addBreakpointWithScriptUri" seems superfluous
- perhaps "invalid argument (uri): Unknown library 'foo'" could just be "The script 'foo' is not loaded" or similar?

I'm not if the difference between a non-existent script and one that just wasn't called/compiled is known, however perhaps it can be assumed that the tools calling this API to set breakpoints are probably sending valid data and therefore the reason is likely that the script is not loaded (unless ofcourse, the URI is obviously invalid)?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.