a variable optical attenuator with photoelectric detector , comprising a collimator , a variable optical attenuator chip , wherein the variable optical attenuator further comprises a photoelectric detector ; and the photoelectric detector receives and detects partial light from the variable optical attenuator chip . the variable optical attenuator of the invention is capable of detecting attenuation change of itself via the variable optical attenuator chip . thus , real - time monitoring and feedback are implemented , and the attenuation performance of the variable optical attenuator is improved .