You should be able to add cider--debug-mode
to the evil-insert-state-modes
list so that you automatically enter insert state when the debugger is triggered. I tried the following but it doesn't work.
(add-to-list 'evil-insert-state-modes 'cider--debug-mode)
I haven't dug into why this isn't working, but for the time being I'm using the cider--debug-mode-hook
which is called whenever you enter or leave the mode.
(defun my-turncider-ondebug-toggle-insert-state ()
(if cider--debug-mode ;; Checks if you're entering the debugger
(evil-insert-state) ;; If so, turn on evil-insert-state
(evil-normal-state))) ;; Otherwise, turn on normal-state
(add-hook 'cider--debug-mode-hook 'my-turncider-ondebug-toggle-insert-state)
This assumes you want to be in normal-state whenever you exit the debugger.