Commit Graph
6 Commits
Author SHA1 Message Date
Jack Nagel 89d13c6e02 Reduce footprint of readline hack 2013-02-07 19:02:20 -06:00
Jack Nagel d0e959a009 Split debrew up to faciliate test isolation
We want to be able to test the raise functionality without
monkey-patching #raise on every object in the system, which is one of
the side effects of loading debrew.rb.
2013-02-06 19:04:43 -06:00
Jack Nagel 771c4cae51 Don't discard exception instance data in debug mode
If the debugger's monkey-patched raise was passed an instantiated
exception, the #exception method was called with a potentially nil
argument, causing its instance data to be thrown away. This hides
potentially useful information from the user.

Fix it by allowing instantiated exceptions to be reraised unharmed.

Fixes #17622.
2013-02-06 11:35:41 -06:00
Jack Nagel 6e39461b4f Work around Readline clash
Only limited debugging functionality is available to things that involve
the Readline formula, but it is better than crashing outright.

c.f. #15776.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-11-11 18:49:32 -06:00
Jack Nagel 6d8ff451d1 debrew: take input from same line as prompt 2012-11-09 15:18:01 -06:00
Camillo Lugaresi dbfe304575 debrew: formula debugging for homebrew
A new feature for easing the pain of working with complex formulas, or
formulas for large packages. When running brew in debug mode (-d), if an
exception propagates outside the formula's install method, you now get a menu
which lets you return to the point where the exception was raised and perfom
several useful actions, such as:
- printing a backtrace
- entering IRB to examine the context and test ruby code
- entering the debugger (if ruby-debug is available)
- entering a shell
- ignoring the exception or proceeding with the raise as normal

Signed-off-by: Max Howell <mxcl@me.com>

* Fixed conflict in build.rb.
* Removed old debug handling in Formula.brew.

Closes #10435.
2012-10-28 11:39:02 -04:00