C# Editor script in Unity

Hi, I am working on an editor tool to open a windowEditor when clicking on a gameObject to easily change some property. I did try some solution as "event" or else but nothing happened even a simple Script as that

public class TestEditor : Editor 
{
    void OnSceneGUI(){
        Debug.Log("Current detected event: " + Event.current.type);     
    }
}

Can someone help me to do such script or show documentation that could help me? thanks

I did a huge tutorial about Editor Side recently. You can see more about that here.
The specific links are: Part 1, Part 2 and part 3.