Closed Bug 646343 Opened 15 years ago Closed 15 years ago

Allow to debug platform through cfx

Categories

(Add-on SDK Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(2 files)

Currently using gdb and all associated stuff around is almost impossible or very hard. We can't pass arguments to firefox to setup debug mode and even if we are able to give some arguments, debug tools won't work as there is problems with stdin/out. So I propose a really simple option in cfx to simply display a the firefox command to run to execute an addon or a test. $ cfx --no-run -b /path/to/your/debug/build/firefox test -f test-leak- or-crash.js In order to execute this, launch the following command: /path/to/your/debug/build/firefox -profile /path/to/tmp/tmpwgbail.mozrunner -no-remote This feature will greatly help platform team to use their tooling!
Attachment #522926 - Flags: review?(myk)
Summary: Allow to debug addons throught cfx → Allow to debug platform throught cfx
Summary: Allow to debug platform throught cfx → Allow to debug platform through cfx
Priority: -- → P1
Target Milestone: --- → 1.0b5
What are the problems with stdin/out that make the fix for bug 646345 insufficient for satisfying the debugging use case?
(The reason I ask is that my first inclination is to fix those bugs. It seems wonky to add a feature just to work around some bugs in our own codebase.)
Comment on attachment 522926 [details] [diff] [review] Implement "--no-run" option Per my previous comments, this feels like the wrong fix, since it adds redundant functionality to work around problems with the way cfx handles stdin/stdout. The right fix is to resolve those stdin/stdout problems. (This fix also appears to leave profile directories laying around, which is problematic.)
Attachment #522926 - Flags: review?(myk) → review-
Blake: Can you tell us if bug 646345, that allow to give extra arguments to firefox, like "-d" are satifying for your debug environnement ? When we where working together I remember that passing "-d" and removing the automatic kill was not enough, you quickly mentioned something around stdin/out ? Myk: bug 646345 won't solve the automatic killed done on test timeout: https://github.com/mozilla/addon-sdk/blob/master/python-lib/cuddlefish/runner.py#L290 This disallow to debug a unit test.
Blake: Can you tell us if bug 646345, that allow to give extra arguments to firefox, like "-d" are satifying for your debug environnement ? When we were working together I remember that passing "-d" and removing the automatic kill was not enough, you quickly mentioned something around stdin/out ? Myk: bug 646345 won't solve the automatic killed done on test timeout: https://github.com/mozilla/addon-sdk/blob/master/python-lib/cuddlefish/runner.py#L290 This disallow to debug a unit test.
No longer blocks: 617857
Assignee: nobody → poirot.alex
Comment on attachment 522926 [details] [diff] [review] Implement "--no-run" option Alex and I talked about this again today. It still isn't clear if this is the right solution. It feels like there's something better we can do here. But we should land this as an experimental feature in the meantime so folks can use it (and give us feedback at their leisure). >diff --git a/python-lib/cuddlefish/__init__.py b/python-lib/cuddlefish/__init__.py >+ (("", "--no-run",), dict(dest="no_run", >+ help=("Do not launch firefox, " >+ "just print command to do so." >+ "(usefull for gdb uses)"), >+ action="store_true", >+ default=False, >+ cmds=['run', 'test'])), This should move to the "Experimental Command-Specific Options" section. And the help message should read "Instead of launching the application, just show the command for doing so. Use this to launch the application in a debugger like gdb." >diff --git a/python-lib/cuddlefish/runner.py b/python-lib/cuddlefish/runner.py >+ if norun: >+ print "In order to execute this, launch the following command:" >+ print " ".join(runner.command)+" "+(" ".join(runner.cmdargs)) >+ return 0 Nit: "To launch the application, enter the following command:" Nit: add spaces around the plus signs, i.e.: print " ".join(runner.command) + " " + (" ".join(runner.cmdargs)) r=myk with these changes.
Attachment #522926 - Flags: review- → review+
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
the patch breaks 'cfx run --use-server', since you didn't update the corresponding run_app implementation: from cuddlefish.server import run_app
Comment on attachment 528728 [details] [diff] [review] Fix --use-server regression due to previous patch. r+a=myk
Attachment #528728 - Flags: review?(myk) → review+
Regression fix landed: https://github.com/mozilla/addon-sdk/commit/00f94413f6655d545b4191713f1fd9872d076f7d Nickolay: Thanks for the fast report!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: