This changes the mapping for the Dart SDK inside Flutter from `org-dartlang-sdk:///third_party/dart/sdk` to org-dartlang-sdk:///flutter/third_party/dart/sdk`. This URI changed in https://github.com/flutter/engine/pull/51917 but was not caught by tests because they only tested a specific set of mappings and there were no integration tests checking what URIs were actually produced by a running app.
So, this change also adds an integration tests that ensures that a real running app produces URIs that are then correctly mapped.
Fixes https://github.com/Dart-Code/Dart-Code/issues/5164.
DDS was temporarily pinned to 4.1.0 because 4.2.0 triggered some test
failures (see https://github.com/flutter/flutter/pull/147250). Those
failures should be fixed by vm_service 14.2.2, so this unpins DDS and
rolls both of these packages (along with devtools_shared, which is a DDS
dependency).
(If the bot updates vm_service before this is done, I can rebase over
that will reduce the size of this PR to just a few files)
Fixes https://github.com/flutter/flutter/issues/136698.
Alters how `throwToolExit` creates its matcher. This results is an improved description of the matcher.
The mismatch description isn't improved by this, but I writing an entirely custom matcher to fix this isn't ideal either. We can instead mitigate the issue by augmenting the `toString` implementation of `ToolExit` to include the exit code, if it is non-null.
With these changes, the first few lines of output from a test would look like this:
```
Expected: throws <Instance of 'ToolExit'> with `exitCode`: <42> and `message`: contains 'message'
Actual: <Closure: () => Never>
Which: threw ToolExit:<Exit code: 41232. Error: message>
```
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:


* [flutter_tools] [dap] Ensure DAP sends app.stop/app.detach during terminate
Fixes an issue where the flutter_tester device may not be cleaned up correctly if we just terminate the Flutter process.
* Update integration test expectations
* Revert accidental commit
* Fix issues running integration tests through DAP
These adapters were incorrectly trying to connect a DDS instance even when Flutter would create its own. This change disables DDS in the DAP layer and leaves it to Flutter (although it passes `--no-dds` on to Flutter if provided to the DAP process).
Also fixes an issue where we would unnecessarily connect the VM Service for tests even in 'noDebug' mode because of a change/fix that now includes a 'vmServiceUri' in the `test.startedProcess` event.
* Add support for attachRequest in DAP, which runs "flutter attach"
* Update DAP docs for attachRequest
* Improve doc comments
* Fix comments
* Remove noDebug from attach + create a getter for `debug`
* Fix indent