This paper develops a framework for analyzing the impact of macroeconomic conditions on credit risk and dynamic capital structure choice. We begin by observing that when cash flows depend on current economic conditions, there will be a benefit for firms to adapt their default and financing policies to the position of the economy in the business cycle phase. We then demonstrate that this simple observation has a wide range of empirical implications for corporations. Notably, we show that our model can replicate observed debt levels and the countercyclicality of leverage ratios. We also demonstrate that it can reproduce the observed term structure of credit spreads and generate strictly positive credit spreads for debt contracts with very short maturities. Finally, we characterize the impact of macroeconomic conditions on the pace and size of capital structure changes, and debt capacity.