Cognex interview question

How do you debug embedded system and what tools to you?