During the standard ac lock-in measurement of the resistance of a two-dimensional electron gas (2DEG) applying an ac current [Formula: see text], the electron temperature [Formula: see text] oscillates with the angular frequency [Formula: see text] due to the Joule heating [Formula: see text]. We have shown that the highest ([Formula: see text]) and the lowest ([Formula: see text]) temperatures during a cycle of the oscillations can be deduced, at cryogenic temperatures, exploiting the third-harmonic (3[Formula: see text]) component of the voltage drop generated by the ac current [Formula: see text] and employing the amplitude of the Shubnikov–de Haas oscillations as the measure of [Formula: see text]. The temperatures [Formula: see text] and [Formula: see text] thus obtained allow us to roughly evaluate the thermal conductivity [Formula: see text] of the 2DEG via the modified 3[Formula: see text] method, in which the method originally devised for bulk materials is modified to be applicable to a 2DEG embedded in a semiconductor wafer. [Formula: see text] thus deduced is found to be consistent with the Wiedemann–Franz law. The method provides a convenient way to access [Formula: see text] using only a standard Hall-bar device and the simple experimental setup for the resistance measurement.