flutter/packages/flutter_tools/test/integration.shard/debug_adapter
Danny Tuppeny 0386f910d1
[flutter_tools/dap] Improve rendering of structured errors via DAP (#131251)
In the legacy VS Code DAP, we would deserialise the Flutter.Error event
and provide some basic colouring (eg. stack frames are faded if not from
user code and the text is split between stdout/stderr to allow the
client to colour it).

In the new DAPs we originally used `renderedErrorText` which didn't
support either of these. This change adds changes to use the structured
data (with some basic parsing because the source classes are in
package:flutter and not accessible here) to provide a similar
experience.

It would be nicer if we could use the real underlying Flutter classes
for this deserialisation, but extracting them from `package:flutter` and
removing all dependencies on Flutter is a much larger job and I don't
think should hold up providing improved error formatting for the new
DAPs.

Some comparisons:


![1_comparison](https://github.com/flutter/flutter/assets/1078012/74e7e6d6-c8d0-471f-b584-37ae148b0ce7)


![2_comparison](https://github.com/flutter/flutter/assets/1078012/21888934-6f2f-4048-86d7-bdf92d5c7301)
2023-07-31 13:03:26 +01:00
..
flutter_adapter_test.dart [flutter_tools/dap] Improve rendering of structured errors via DAP (#131251) 2023-07-31 13:03:26 +01:00
test_adapter_test.dart Roll dds dependency to 2.8.3 for expression evaluation upcoming fixes. (#128124) 2023-06-02 23:31:07 +00:00
test_client.dart [flutter_tools/dap] Improve rendering of structured errors via DAP (#131251) 2023-07-31 13:03:26 +01:00
test_server.dart Provide more useful error message if a non-compliant DAP tool (or user) sends bad input to DAP server (#107827) 2022-07-19 11:48:05 -07:00
test_support.dart [flutter_tools/dap] Improve rendering of structured errors via DAP (#131251) 2023-07-31 13:03:26 +01:00