-
Notifications
You must be signed in to change notification settings - Fork 758
Conversation
assets/panel/debugger.properties
Outdated
@@ -497,6 +497,10 @@ expressions.errorMsg=Invalid expression… | |||
expressions.label=Add watch expression | |||
expressions.accesskey=e | |||
|
|||
xhrBreakpoints.header=XHR Breakpoints | |||
xhrBreakpoints.placeholder=Break when url contains |
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.
I think URL should be uppercase
assets/panel/debugger.properties
Outdated
@@ -497,6 +497,10 @@ expressions.errorMsg=Invalid expression… | |||
expressions.label=Add watch expression | |||
expressions.accesskey=e | |||
|
|||
xhrBreakpoints.header=XHR Breakpoints | |||
xhrBreakpoints.placeholder=Break when url contains | |||
xhrBreakpoints.label=Add xhr breakpoint |
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.
XHR was uppercase in the previous string
That's great @AnshulMalik ! The only thing that puzzles me a bit is the "leave input empty to break on all XHR".
or something better, but that a clear distinction between breaking on everything and allowing for URL matching. |
@nchevobbe Yeah, that sounds more practical. Since the designs were not yet ready, so I went ahead with what chrome does. |
When @AnshulMalik casually submits a PR for an incredibly awesome feature: I'll take an in-depth look at this tomorrow. Obviously this is awesome but wasn't well spec'd out by us so there will likely be lots of feedback. In the mean time...this is amazing! Thank you! 💯 |
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.
String-wise it looks good, thanks for updating it.
Letting code review to the actual devs ;-)
A few behavioral things I'm seeing:
These are all minor things; I think if you get time to clean this up a bit (i.e. removing commented code), we can try to land something. Great work so far @AnshulMalik ! |
Hey @darkwing, thanks for the comments, here my my thoughts:
|
Adding in an older mockup from @violasong: Obviously we dont' need to do all of this at once. It might be nice in this first PR if we can add the GET/POST dropdown for adding the breakpoint though. |
Just to clarify: The mockup should not inform the UI or requirements for this first implementation. Goal is a simple UI, similar to existing XHR breakpoint implementations (aka Chrome). We will iterate on the UI in the future, @mcroud is working taking over the design work. Just to re-iterate the basic requirements:
Do they make sense? |
Per @digitarald's comment, the only thing missing is a "pause on all XHRs"; maybe in the short term we can simply add a checkbox like we do for "Pause on Exceptions". Up for it @AnshulMalik ? This is sooooooo close! |
Chrome offers a checkbox for this, so maybe. The alternative is would be an XHR breakpoint without a URL filter (which Chrome has before I think). How are empty XHR breakpoints treated in the current solution? |
Okay, we can have a checkbox for pause on all xhr, |
Looks like the latest behavior on Chrome removes empty XHR breakpoints. |
@@ -513,6 +513,14 @@ expressions.label=Add watch expression | |||
expressions.accesskey=e | |||
expressions.key=CmdOrCtrl+Shift+E | |||
|
|||
xhrBreakpoints.header=XHR Breakpoints |
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.
We need a note here.
assets/panel/debugger.properties
Outdated
# LOCALIZATION NOTE (expressions.errorMsg): Error text for expression | ||
# input element | ||
expressions.errorMsg=Invalid expression… | ||
expressions.label=Add watch expression | ||
expressions.accesskey=e | ||
expressions.key=CmdOrCtrl+Shift+E | ||
|
||
# LOCALIZATION NOTE (xhrBreakpoints): The pause on any xhr breakpoints headings |
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.
The string ID referenced in the comment should be xhrBreakpoints.header
, also XHR (uppercase) in the note itself for consistency.
I've rebased and fixed a header issue. @AnshulMalik Would you be able to make a quick mochitest or two for this functionality? i.e. add an xhr breakpoint and ensure it pauses when hit? |
Created a PR here, to allow the functionality to work firefox-devtools/devtools-core#1098 |
Current to do:
|
ebb82cf
to
7bc0a4d
Compare
c34f8a4
to
c730fff
Compare
const dbg = await initDebugger("doc-xhr.html"); | ||
await waitForSources(dbg, "fetch.js"); | ||
await dbg.actions.setXHRBreakpoint("doc", "GET"); | ||
debugger; |
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.
Is this supposed to be here? Shouldn't the pause happen from setting the breakpoint?
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.
Yep, it should not be here
OK, cool, manually tested and this is totally in the right direction. Yay! A few things:
|
1-3 are present in this commit.
|
Here are the final mockups for light and dark mode complete with the agreed "pause" terminology. Light mode: Dark mode: |
Fixes Issue: #5255
Summary of Changes
Screenshots/Videos (OPTIONAL)