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

Fetch full developer.log messages #2333

Merged
merged 9 commits into from
Jan 11, 2024
Merged

Conversation

elliette
Copy link
Contributor

@elliette elliette commented Jan 9, 2024

Fixes #2330, flutter/devtools#3222

The CDP consoleAPICalled event args are RemoteObjects with only the objectPreview provided. This objectPreview is what we were previously constructing the RemoteLog from. Since they are only a preview, the log messages are abbreviated.

To get the full log message, we need to fetch the full object using getProperties.

Confirmed that we now see unabbreviated logs in DevTools:

Screenshot 2024-01-09 at 2 42 29 PM

@elliette
Copy link
Contributor Author

elliette commented Jan 9, 2024

Will update the CHANGELOG once I reset DWDS (it was just released): #2334

Copy link
Contributor

@nshahan nshahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so excited you found the answer to the truncating message! Thank you so much!

Is there an easy way to reproduce the truncating so that we can test it is no longer happening?

And just to document our in person conversation, we can look into the inspect() API as well.

dwds/lib/src/services/chrome_proxy_service.dart Outdated Show resolved Hide resolved
@elliette elliette changed the title Fetch full developer.log messages Fetch full dart.developer.log messages Jan 10, 2024
@elliette elliette changed the title Fetch full dart.developer.log messages Fetch full developer.log messages Jan 10, 2024
@elliette
Copy link
Contributor Author

I'm so excited you found the answer to the truncating message! Thank you so much!

Is there an easy way to reproduce the truncating so that we can test it is no longer happening?

And just to document our in person conversation, we can look into the inspect() API as well.

Added a test case, and opened a bug and added a TODO for inspect

@elliette elliette merged commit 7c096a2 into dart-lang:master Jan 11, 2024
47 checks passed
@toineheuvelmans
Copy link

My webdev version is 3.4.0, which should include this fix, but I still see truncated logs. Am I missing something?

@elliette
Copy link
Contributor Author

Hi @toineheuvelmans ! Could you file an issue here with steps to reproduce? https://github.com/dart-lang/webdev/issues/new?assignees=&labels=package%3Awebdev&projects=&template=webdev.md

It's possible we aren't able to fetch the full logs here:

: _fetchAbbreviatedLogParams(logObject);

Thanks!

@toineheuvelmans
Copy link

Hi @elliette, here you go, I hope this suffices: #2400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send untruncated dart:developer logs to debugging clients
4 participants