A novel visualization system, in which polymer melt is sheared by a sliding plate, was established to simulate different pressure shear zones of the screw extruder. In this work, the nucleation, growth, coalescence, and breakup of n‐hexane bubbles in the high‐density polyethylene (HDPE) melt under shear stress were observed through a high‐speed camera. It was found that the nucleation rate of bubbles in the HDPE melt increased with the shear rate. Moreover, the bubble diameter at high‐pressure shear zones decreased with time until bubbles disappeared but increased with time at low‐pressure shear zones. A modified prediction model of bubble coalescence time at high‐pressure shear zones was established, and the relative deviation was less than 1%. Three bubble breakup modes, that is, tensile breakup, erosive breakup, and breakup at the gas–liquid interface, were observed under shear. Finally, a new mechanism of foam devolatilization in the screw extruder was proposed.