Polymer foams are cellular solids composed of solid and gas phases, whose mechanical, thermal, and acoustic properties are determined by the composition, volume fraction, and connectivity of both phases. A new high-throughput additive manufacturing method, referred to as direct bubble writing, for creating polymer foams with locally programmed bubble size, volume fraction, and connectivity is reported. Direct bubble writing relies on rapid generation and patterning of liquid shell–gas core droplets produced using a core–shell nozzle. The printed polymer foams are able to retain their overall shape, since the outer shell of these bubble droplets consist of a low-viscosity monomer that is rapidly polymerized during the printing process. The transition between open- and closed-cell foams is independently controlled by the gas used, while the foam can be tailored on-the-fly by adjusting the gas pressure used to produce the bubble droplets. As exemplars, homogeneous and graded polymer foams in several motifs, including 3D lattices, shells, and out-of-plane pillars are fabricated. Conductive composite foams with controlled stiffness for use as soft pressure sensors are also produced