Here we develop a minimally disruptive optical approach to control protein tyrosine phosphatase 1B (PTP1B)—an important regulator of receptor tyrosine kinases and a therapeutic target for the treatment of diabetes, obesity, and cancer—and we use that approach to probe the intracellular function of this enzyme. The gene discussed is PTPN1; the disease is obesity disorder.