Button OnClick() Editor And Runtime option

My goal is to to draw some debug lines (using Debug.DrawLine(…) )in the scene view by clicking a button in the game view without having to run the game. The button has assigned on the OnClick event Action the scene object with the method running the script as well as the Editor And Runtime option.
This doesn’t seem to trigger anything even though all the connected scripts have been tagged with [ExecuteInEditMode].

Has anyone ever managed to do something like this or am I trying that is not supposed to happen by design?

Other posts I found:

The Game view is not active when you’re not in Play mode. The view updates to show you what your camera is seeing, but you can’t process input events and such without the game being active.

You can add GUI elements to the Scene view that can run functions in Edit mode, and you can do the same in custom editors that show up in the Inspector or a custom editor window. I recommend running through the Editor Scripting tutorial to learn more.