The phrase "iron out bugs"
It is a combination of two separate metaphorical ideas that are not etymologically linked.
The first - iron out - is a phrasal verb meaning to resolve.
The second - bugs - refers to a malfunction of computer hardware, and its origins are debatable.
Combine the two, and you arrive at resolve computer malfunctions.
Iron out bugs means, basically, to debug. It comes from a conjunction of the phrase iron out, figurative for resolve (a problem), and the programming term bug.
According to dictionary.com:
-Verb phrase
26. iron out,
a. to iron or press (an item of clothing or the like).
b. to remove (wrinkles) from by ironing.
c. to resolve or clear up (difficulties, disagreements, etc.): The problem was ironed out months ago.