~ようとする
Try to do something, or be just about to act or change
You’ll be able to use the volitional form + とする to distinguish an attempt to act from an action or change that is just about to happen.

たき火に火をつけようとした時、強い風が吹いてきました。
takibi ni hi o tsukeyou to shita toki, tsuyoi kaze ga fuite kimashita.
What do you think this sentence means?
Just as I was about to light the campfire, a strong wind started to blow.
Be about to act or make an attempt
~ようとする combines the volitional verb form with とする. It expresses being on the very brink of beginning an action ("about to...") or attempting to do something.
窓を開けようとしたが、開かなかった。
mado o akeyou to shita ga, akanakatta.
I tried to open the window, but it would not open.
太陽が沈もうとしている。
taiyou ga shizumou to shite iru.
The sun is about to set.
Attach とする to the volitional form
Conjugate the verb into its plain volitional form (~(よ)う) and attach とする (or としている, とした時).
子犬が庭の柵を飛び越えようとしている。
koinu ga niwa no saku o tobikoeyou to shite iru.
The puppy is trying to leap over the garden fence.
~てみる vs ~ようとする
Both can be translated “try”. ~てみる means you actually did it to see what it was like. ~ようとする means you made an attempt or were about to act, and often it did not happen.
~てみる, try (and do it)
その箱を持ち上げてみた。
sono hako o mochiagete mita.
I tried lifting the box (I actually did it).
The action happened.
~ようとする, attempt to
その箱を持ち上げようとした。
sono hako o mochiageyou to shita.
I tried to lift the box (but maybe could not).
An attempt; the result is open.
電車のドアが閉まろうとした時、男の人が走って乗ってきた。
densha no doa ga shimarou to shita toki, otoko no hito ga hashitte notte kita.
Just as the train doors were about to close, a man came running on board.
赤ちゃんが一人で立とうとしているので、みんなで静かに見守った。
akachan ga hitori de tatou to shite iru node, minna de shizuka ni mimamotta.
The baby was trying to stand up alone, so we all watched quietly.
冷蔵庫のプリンにスプーンを入れようとした時、妹に「それ、私の!」と止められた。
reizouko no purin ni supuun o ireyou to shita toki, imouto ni "sore, watashi no!" to tomerareta.
Just as I was about to put my spoon into the pudding from the fridge, my younger sister stopped me, saying, "That’s mine!"
7 more examples in the grammar path — free for a limited time.