ことを考えながら

while thinking about

→ こと
phrase Common #2,958
while thinking about Used to describe doing something while thinking about a matter or situation.
JA: 将来のことを考えながら、勉強しています。
EN: I’m studying while thinking about the future.