Why are the rotation values different than in the inspector?

I am having some problems finding the correct force for RigidBody2D and I came across something which is confusing me and I cannot seem to find an answer for my question. So here it goes: In my experimenting have a game object which has both a parent and a child. I can rotate the gameObject in my program using the keyboard. Here is the thing - when I print out the rotation values of the objects:
Debug.Log("parent " + transform.parent.eulerAngles);
Debug.Log ("object " + transform.eulerAngles);
Debug.Log ("child " + transform.GetChild (0).eulerAngles);

The values being printed are not the same as the values in the inspector. Obviously transform.parent.eulerAngles is not how you get the XYZ values that are showing in the inspector, so could someone please tell me how I do get those values? I have tried Quaternions and converting Quaternions to euler angels and using transform.rotation and I am having no luck?

Give localEulerAngles a try, it might be that you are printing world angles and the editor shows the local angles.