-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
DevTools: Implement support for showing source_content
in Debugger > Source
panel
#36774
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
Conversation
751c944
to
c5c54ad
Compare
c5c54ad
to
dfef24d
Compare
dfef24d
to
53a52e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming back to the patch a month later, I’ve completely forgotten the sequence of messages needed to send source contents to the Debugger > Sources panel, and I’ll admit I struggled to relearn that from our code.
Can we add an automated test as part of this patch? I was not as concerned about this when we were last pairing, but I think now more than ever it’s important that we land new features with tests. This both prevents regressions and documents the minimal message sequence needed to get the feature working.
Also can we document why we’re adding each message handler? Ideally with links to Firefox docs or source code, but at the very least that they are needed for sending source contents to Debugger > Sources. As the actors get more complex, it gets harder to understand which features depend on which messages.
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
53a52e1
to
0f7607b
Compare
Hmm, we can indeed add more comments. In general, when I am implementing a feature, I mostly look at the Firefox logs and its expectations for a certain actor and then implement it. This doesn’t necessarily involve reading the Firefox source code all the time. I find myself searching the Firefox DevTools code when I have implemented an actor as per the Firefox logs but it is not working, then I look into the Firefox code. But I agree that we should add more comments. Happy to hear what else we can do. I have added some tests to test the source_content. I will be adding source content related tests with #36874 that is the next thing i am working on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, with a few minor comments :)
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
c6d7d4a
to
9c8cd3b
Compare
… > Source` panel (servo#36774) This patch adds support for showing source_content in `Debugger > Source` panel. This works by handling the clients `source` messages in the source actor. These source actors are already advertised as resource via the watcher, populating the source list. We also update the `sources` handler in thread actor for future work in thread debugging. Note: while this PR also adds support for showing worker script source_content, worker has been broken (See servo#37012). I was able to confirm the `content_type` and `source_content` for worker script in logs.  Fixes: part of servo#36027 --------- Signed-off-by: atbrakhi <atbrakhi@igalia.com>
This patch adds support for showing source_content in
Debugger > Source
panel. This works by handling the clientssource
messages in the source actor. These source actors are already advertised as resource via the watcher, populating the source list. We also update thesources
handler in thread actor for future work in thread debugging.Note: while this PR also adds support for showing worker script source_content, worker has been broken (See #37012). I was able to confirm the
content_type
andsource_content
for worker script in logs.Fixes: part of #36027