Since Go does not allow to debug tests in some IDEs (see also this issue) I had to write my tests twice in my queue implementation.
One time inside main.go, second time - inside queue_test.go
I use Visual Studio Code with delve.
What is the best IDE or pattern to debug Go tests without duplicating them ?
I think your IDE is unable to debug tests.
Try something different. For example, as of today, the early access edition of Gogland works quite well with regards to debugging, even with tests. It uses the Delve debugger under the hood, so you can even resort to run the debugger manually from terminal or check to see if it is already integrated with your IDE of choice.