A warning device, such as an alarm, a flash lamp, etc. (not shown), may be optionally provided to connect to the control circuit board 116 for reminding a user that the number of trapped mice or cockroaches will soon reach a maximum detention capacity of the trapping device 1, so that the user could timely clear off the trapped mice or cockroaches and maintain the trapping device 1 in an optimal w