Crossword Genius

What the dog does when a spy is discovered? (4)

Ross

I believe the answer is:

yaps

I'm a little stuck... Click here to teach me more about this clue!

'what the dog' is the definition.
I can't judge whether this defines the answer.

'when a spy is discovered?' is the wordplay.
'a spy' can be anagrammed to 'YAPS'.
Though, I am unsure how this is indicated.

'does' acts as a link.

Can you help me to learn more?

(Other definitions for yaps that I've seen before include "Barks" , "Chatters" , "shrill sounds" .)

I've seen this clue in the Evening Standard.
Want a hint initially instead of a full solution? Install my app