This paper applies stochastic simulation methods to assess debt sustainability in emerging market economies and provide probability measures for projections of the external and public debt burden over the medium term. The vulnerability of public debt to adverse shocks is determined by a number of interrelated factors, including the volatility of output, financial fragility, the endogenous response of the risk premium, and sudden stops in private capital flows. The vulnerability of external debt is sensitive to the determination of the exchange rate and to the pricing of traded goods. We show that fiscal policy can act in a preemptive manner to prevent the debt burden from rising significantly over the medium term. This requires flexibility in fiscal planning, which many emerging market economies lack. Emerging market economies therefore face a difficult trade-off between managing the risk of a debt crisis and pursuing other important fiscal policy objectives.