Add a way to wait to debug child processes' native code
Categories
(GeckoView Graveyard :: Sandboxing, enhancement, P3)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: agi, Assigned: nalexander)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
We need a way to wait for the debugger for child processes, similar to MOZ_DEBUG_CHILD_PROCESS
for desktop.
Assignee | ||
Comment 1•6 years ago
|
||
agi: snorp pointed you at try MOZ_DEBUG_CHILD_PROCESS=1 and MOZ_DEBUG_CHILD_PAUSE=10. Can you test, capture this somewhere (in the GeckoView wiki -- I don't know anywhere better), and if you're satisfied close this ticket?
If it's easy we could support this in mach run
while we're trying to improve that functionality: Bug 1521996.
Assignee | ||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
P3. This is necessary for debugging content process crashes on startup.
Reporter | ||
Comment 3•6 years ago
|
||
OK looks like MOZ_DEBUG_CHILD_PAUSE
works somewhat, but we can do better. I think we should add a flag similar to MOZ_DEBUG_CHILD_PROCESS
that makes us wait for the debugger (right now the code just continues) something like MOZ_DEBUG_WAIT_FOR_JAVA_DEBUGGER
.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
Set MOZ_DEBUG_WAIT_FOR_JAVA_DEBUGGER=1 in the environment to make the
main (Gecko) process wait for a Java debugger to connect. This is a
superset of Android Studio's built-in debugging support so it won't be
particularly useful, but perhaps some folks want to use a different
jdwp debugger.
Set MOZ_DEBUG_CHILD_WAIT_FOR_JAVA_DEBUGGER=filter in the environment
to make child processes wait for a Java debugger to connect. This is
not easy in Android Studio.
Valid filter values are:
- "1" to make all child processes (:tab, :media, etc) wait
- "suffix" to make any child process with a process name with suffix "suffix" wait
N.b.: the empty string "" is a suffix of all process names and thus
MOZ_DEBUG_CHILD_WAIT_FOR_JAVA_DEBUGGER= makes all child processes wait.
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
For folks following along at home, documentation is here: https://mozilla.github.io/geckoview/tutorials/native-debugging.html#attaching-debuggers-to-content-and-other-child-processes.
Comment 7•6 years ago
|
||
bugherder |
Comment 8•3 years ago
|
||
Moving content process bugs to the new GeckoView::Sandboxing component.
Updated•9 months ago
|
Description
•