It's a laughable thing when my code is broken (6)
I believe the answer is:
comedy
'it's a laughable thing' is the definition.
I can't tell whether this defines the answer.
'my code is broken' is the wordplay.
'is broken' is an anagram indicator.
'my'+'code'='mycode'
'mycode' is an anagram of 'COMEDY'.
'when' acts as a link.
Can you help me to learn more?
(Other definitions for comedy that I've seen before include "Drama genre" , "Light amusing play or film" , "fun" , "Play about identical twins" , "Humorous film/play" .)