Closed Bug 1411776 Opened 4 years ago Closed 4 years ago

|mach run --debug| fails with "AttributeError: 'module' object has no attribute 'get_default_debugger_name'"

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox-esr52 unaffected, firefox56 unaffected, firefox57 unaffected, firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox-esr52 --- unaffected
firefox56 --- unaffected
firefox57 --- unaffected
firefox58 --- fixed

People

(Reporter: botond, Assigned: ahal)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

STR:
  1. Build recent trunk on Linux
  2. Run |mach run --debug|

Expected results:

  Firefox is launched with the default debugger attached.

Actual results:

AttributeError: 'module' object has no attribute 'get_default_debugger_name'

  File "/home/botond/dev/projects/mozilla/central/python/mozbuild/mozbuild/mach_commands.py", line 1417, in run
    debugger = mozdebug.get_default_debugger_name(mozdebug.DebuggerSearch.KeepLooking)


|mach run --debugger gdb| triggers a similar error:

  AttributeError: 'module' object has no attribute 'get_debugger_info'

  File "/home/botond/dev/projects/mozilla/central/python/mozbuild/mozbuild/mach_commands.py", line 1420, in run
    self.debuggerInfo = mozdebug.get_debugger_info(debugger, debugger_args)

This is a recent regression.
Summary: |mach run --debug|fails with "AttributeError: 'module' object has no attribute 'get_default_debugger_name'" → |mach run --debug| fails with "AttributeError: 'module' object has no attribute 'get_default_debugger_name'"
Keywords: regression
Looks like a regression from bug 1397849.
Blocks: 1397849
Blocks: 1411849
The fix is to change this line:
https://hg.mozilla.org/mozilla-central/file/02a070f1901a/testing/mozbase/mozdebug/mozdebug/__init__.py#l32

to:
from .mozdebug import *

I'll have the patch up soon, just working on adding some basic tests for mozdebug so this gets caught next time.
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Comment on attachment 8922343 [details]
Bug 1411776 - [mozdebug] Fix 'module has no attribute' error when using --debugger,

https://reviewboard.mozilla.org/r/193396/#review198598

good find
Attachment #8922343 - Flags: review?(jmaher) → review+
Comment on attachment 8922344 [details]
Bug 1411776 - [mozdebug] Add a basic test for get_default_debugger_name,

https://reviewboard.mozilla.org/r/193398/#review198602

+1 for more unittests
Attachment #8922344 - Flags: review?(jmaher) → review+
Good thing I waited on try, the test fails on Windows:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a4cd48552967f4937725693ecbbca41fe482c690

I'll land the first commit now to unblock people and file a follow-up to get the tests landed.
Attachment #8922344 - Attachment is obsolete: true
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84940c8fb352
[mozdebug] Fix 'module has no attribute' error when using --debugger, r=jmaher
Blocks: 1412012
Duplicate of this bug: 1412024
https://hg.mozilla.org/mozilla-central/rev/84940c8fb352
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Version: unspecified → Trunk
Duplicate of this bug: 1411897
Duplicate of this bug: 1412409
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.