The real-time power monitoring of gyrotron is one of the key issues in the operation of electron cyclotron resonance heating system. The detector can be used for real-time power monitoring. We analyzed the principle of diode detection and designed a D-band wideband detector based on Schottky diode in this paper. The detector includes a waveguide-to-microstrip transition, a matching circuit, a diode, and a low pass filter. A novel waveguide-to-microstrip transition was developed based on probe coupling. A wideband lossy matching circuit was developed based on tapered-line and series matching resistor. The simulation results show that when the input power is -30dBm at 140 GHz, the detection sensitivity is about 1600V/W.