Skip to content

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

@DanTup

Description

@DanTup

Moving this from Dart-Code/Dart-Code#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)?

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onpackage:dwdstriaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions