Code-switching between English and Indonesian is a common phenomenon in EFL classrooms, yet it is often viewed by novice teachers as a sign of weakness rather than a deliberate pedagogical strategy. Previous studies have generally examined teachers' and students' perceptions of code-switching in isolation, without comparing whether students' understanding actually matches teachers' pedagogical intentions. This research aimed to analyze the types of code-switching used by an EFL teacher in classroom interaction and to investigate the teacher's and students' perceptions toward its use. Using a qualitative descriptive design, data were collected through classroom observations and semi-structured interviews with one English teacher and five students at a senior high school in Jambi, and were analyzed using an established classification of code-switching. The findings showed that the teacher employed two types of code-switching, namely inter-sentential and intra-sentential switching, with inter-sentential switching used most frequently to facilitate comprehension, clarify instructions, and explain vocabulary. The teacher held consistently positive perceptions of code-switching, and most students shared this view, reporting improved comprehension, vocabulary learning, and confidence. However, some students felt that excessive code-switching, particularly the use of regional languages, reduced their opportunities to practice English, revealing a partial divergence between the teacher's intentions and students' experience. These findings suggest that EFL teachers should use code-switching purposefully rather than habitually.