Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP #2486

Closed

WIP #2486

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 24.2.0-wip

## 24.1.0

- Fix bug where debugging clients are not aware of service extensions when connecting to a new web app. - [#2388](https://github.com/dart-lang/webdev/pull/2388)
Expand Down
5 changes: 2 additions & 3 deletions dwds/lib/src/debugging/instance.dart
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,8 @@ class InstanceHelper extends Domain {
objectId,
offset: offset,
count: count,
length: metaData.kind != InstanceKind.kPlainInstance
? metaData.length
: null,
length:
metaData.kind != InstanceKind.kPlainInstance ? metaData.length : null,
);

final dartProperties = await _dartFieldsFor(properties, remoteObject);
Expand Down
5 changes: 5 additions & 0 deletions dwds/lib/src/handlers/injector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,19 @@ class DwdsInjector {

Middleware get middleware => (innerHandler) {
return (Request request) async {
_logger.shout('BRUH2 start');
_logger.shout(request.requestedUri.path);
_logger.shout('BRUH2 end');
if (request.url.path.endsWith('$_clientScript.js')) {
final uri = await Isolate.resolvePackageUri(
Uri.parse('package:$_clientScript.js'),
);
if (uri == null) {
throw StateError('Cannot resolve "package:$_clientScript.js"');
}
_logger.shout('BRUH3');
final result = await File(uri.toFilePath()).readAsString();
_logger.shout('BRUH4');
return Response.ok(
result,
headers: {
Expand Down
Loading
Loading