A light-emitting diode (LED) tube lamp includes at least a first and second external connection terminal each connected to an opposite side of the ballast by-pass LED tube lamp and is capable of operating in a ballast-bypass mode The LED tube lamp includes an LED module configured to emit light in response to a lamp driving signal and a power supply module electrically connected to the first and second external connection terminals for receiving an AC supply signal having frequency of 50 Hz or 60 Hz in the ballast-bypass mode and configured to provide the driving current to the LED module. The power supply module comprises a rectifying circuit, receiving the AC supply signal from a rectifying input side; a filtering circuit, electrically connected to the rectifying circuit; a driving circuit, electrically connected to the filtering circuit and configured to generate the lamp driving signal to drive the LED module for emitting light; a first circuit; and a second circuit, electrically connected to the rectifying circuit and the first circuit and configured to form a detection path between the rectifying input side and a ground terminal. The first circuit turns on the detection path and cuts off the detection path so as to cause a detection current having pulse waveform flowing through the detection path, and the second circuit generates a signal, for indicating whether a foreign external impedance is electrically connected to the LED tube lamp, in response to the detection current.