This paper presents a voltage-mode direct time-of-flight (DToF) driver with high resolution auto-peak-power controller (APPC) and peak-current detector (PCD), utilizing on-chip oscilloscope (OCO) technology. The OCO supports both optical input for APPC and electrical input for PCD. The optical input detects laser diode (LD) peak power through photodiode (PD) first, and then feeds back to the boost converter to adjust laser diode supply voltage (LDVCC) to reach the target peak optical power. The electrical input detects the peak current of the LD to prevent the APPC from adapting to excessive output caused by the abnormal operation of the PD or LD. The X-coordinate of OCO has an 11-bit precision. It can detect pulse widths ranging from 500 ps to 10 ns. The test result shows that, the variation of optical power can be controlled within 2\% in the temperature range of 25-85 ℃ with APPC function.