When talking about performing tasks and fulfilling responsibilities that come with one's job, the phrase "in the line of duty" is often used. However, there are several alternative phrases that convey the same meaning, such as "on the job," "at work," or "while serving." Other related expressions to describe someone carrying out their professional duties include "in service," "on duty," and "engaged in official duties." These synonyms can be used interchangeably with "in the line of duty" and are often used in the context of professions such as law enforcement, military, and emergency services.