Kirell
Kirell

Reputation: 9798

Homebrew formula install step by step for debug

I would like to install a formula step by step, get the folder where the files are extracted from the zip, run configure, and do make and make install with the options set by the formula.

When I run:

brew install -vd formula

It justs show the output, I would like to stop at each stage. It is possible ?

Upvotes: 9

Views: 4385

Answers (1)

Rob Kennedy
Rob Kennedy

Reputation: 163277

Homebrew will automatically give you a chance to inspect things when something goes wrong in the installation. Therefore, all you have to do to let yourself poke around is to force something to go wrong at whatever point you wish. For example, you could include this in your formula:

system "false"

Homebrew will present a menu asking you want you want to do. Choose the "shell" option to inspect the build environment.

You might also try running the brew command in the Ruby debugger. Then you can set breakpoints wherever you wish.

Upvotes: 8

Related Questions