createDebugThread

public void createDebugThread(@NotNull() @NotNull() DebugEnvironment debugEnv, @Nullable() @Nullable() Integer threadId)(source)

Throws

if debugEnv is currently associated with an active debug session

if threadId is out of range for the player associated with debugEnv, or currently associated with an active debug session