Open Bug 1863718 Opened 2 years ago Updated 2 years ago

./mach wpt --debugger=[gdb|lldb|rr|...] does not work for WebDriver BiDi tests

Categories

(Remote Protocol :: WebDriver BiDi, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: hsivonen, Unassigned)

References

Details

Attachments

(1 file)

For normal WPTs, ./mach wpt --debugger=rr records the Firefox execution. However, if the test is a WebDriver BiDi Python file, there is no recording.

The harness should support injecting rr is the invoked binary with record as the second argument, followed by the Firefox binary path and the Firefox arguments right about here:
https://searchfox.org/mozilla-central/rev/02841791400cf7cf5760c0cfaf31f5d772624253/testing/mozbase/rust/mozrunner/src/runner.rs#279

So this is not that trivial given that wdspec tests use geckodriver to start the Firefox binary. One could consider a --debugger argument or some kind of capability under moz:firefoxOptions the wpt harness could set, but this might cause a bit of work. Also because geckodriver internally uses timeouts to check for the browser startup, and we would have to disable those when a debugger is active.

Something simpler (as given by James) might be if the wpt harness could launch the binary wrapped by the debugger.

Nevertheless both need some amount of work and given that this is the first time the problem came up we would like to know how important it actually is.

Henri, does it in any kind block you, or is it just annoyance when trying to debug an issue in Firefox?

Severity: -- → S3
Flags: needinfo?(hsivonen)
Priority: -- → P3

Henri, does it in any kind block you, or is it just annoyance when trying to debug an issue in Firefox?

It blocks in the sense that I think I need to be able to record Firefox inside the driver. However, I currently have not run into a problem with timeouts with rr inside the driver (timeouts were a problem when trying to record the entire mach process tree), so this does not block me in the sense that I can work around this by locally patching runner.rs (in a hard-coded way that wouldn't be an appropriate fix to land) when I need to record.

Flags: needinfo?(hsivonen)

Would you mind sharing the patch that you are using for debugging with rr?

Attached file Quick workaround

Sorry about the delay. Attaching the patch I used as a workaround.

Thanks. I think it would even be good similar to the Marionette bug to allow different debuggers.

Summary: ./mach wpt --debugger=rr does not work for WebDriver BiDi tests → ./mach wpt --debugger=[gdb|lldb|rr|...] does not work for WebDriver BiDi tests
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: