Debugging the editor itself

Is it possible to debug the editor itself, all its built-in functions ?

I see that it is posible to debug user’s scripts in the compiled game executable file, but I need to do the opposite thing – I want to debug the editor iteslf.

The reason: I am having tons of exceptions performing a simple action in the standard editor’s window and the error text in the console does not tell anything about the reason of the exception.

P. S.

The documentation says:

You can debug C# code that is running in the Unity Editor while the Unity Editor is in Play Mode.

However, I need to debug the editor itself, not the compiled game.

Thank you.

Update 1

On Microsoft’s web site( link ) they say that it is possible to debug editor’s script, not only the built game.

Visual Studio Tools for Unity lets you debug both editor and game scripts for your Unity project using Visual Studio’s powerful debugger.

However, later in the text they say the opposite:

Switch to Unity and click the Play button to run the game in the editor.

So, they suppose that I am debugging the built game. But I need to debug the editor. Oh …

It looks like I am able to debug the editor’s script even when the game is not lanuched. After I attach to the Unity from Visual Studio, I can double click the exception and it throws me into Visual Studio and the code line.

Something is broken in the built-in file SplineInstantiate.cs

Update 2

It looks like debugging of editor’s scripts is useless. When I am jumping over code lines in Visual Studio and an exception is thrown, it is thrown into the Unity, not into the debugger in Visual Studio which is attached to Unity. So, I can not catch that exception in Visual Studio.

The only thing I can do is to clear all breakpoints in Visual Studio to unfreeze the Unity window and then double click in Unity to jump into the code line in Visual Studio and set breakpoints.

Exceptions are catched by Unity, not the debugger in Visual Studio, this is the main problem here. So, it will be impossible for me to debug the editor’s script normally while I am not develeoper of Unity and have no idea how their engine works. Oh …

However, if I switch on the “Error Pause” in Unity, the Unity window does not freeze on error and does not spam tons of exceptions. So, there is a chance to see the list of exceptions.