Bug 1129798 - Use pdb.runcall to debug mach commands; r=ahal

The previous debugger was setting a breakpoint in the mach dispatcher.
This required users to step into the main function to be called into.
Using pdb.runcall(), the debugger starts at the first line in the
executed command, which is far more useful.

--HG--
extra : rebase_source : 10734805ad40ec85eedbb089b11d618dc32398e7
extra : amend_source : da89da1af1f137db2f5902bcb5a69312f4636a4b
This commit is contained in:
Gregory Szorc 2015-02-04 22:49:06 -08:00
Родитель b459d5b70b
Коммит 3d2bba6b22
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -445,12 +445,12 @@ To see more help for a specific command, run:
fn = getattr(instance, handler.method)
if args.debug_command:
import pdb
pdb.set_trace()
try:
result = fn(**vars(args.command_args))
if args.debug_command:
import pdb
result = pdb.runcall(fn, **vars(args.command_args))
else:
result = fn(**vars(args.command_args))
if not result:
result = 0