Is there anyway to debug "which code of line is manipulating a specific game object in hierarchy?"

Hi Everyone, I hope you are all doing great.

Situation : I have player car in the scene at transform A but when i play the game, the car spawns at transform B. Basically it is being assigned transform B through script on runtime when game start. I can find that line of code by looking into scripts and i will find it for sure.

Main Question : What I want to know is that is there anyway to somehow debug to find which line of code is making this change to the player car? Is there any easier way rather than looking into multiple scripts, is there any direct approach to it?

It might be a very basic question. Thank you in advance.

Debug.Log() takes in two parameters. The first is what should be output to the console, and the second is the context. If you put a game object as the context, when you go to the console and click on the message, it will highlight the game object in the hierarchy. For example:

Debug.Log("Object is now parented to: ", obj2);

@msohaibmk