As many others have already said, writing pseudocode is great. Once you have figured out the structure, move on to converting it into the language of choice. Then you're separating the problem into two pieces:
1. What do I want this to do
2. How do I want it to do it
I've used this tool really frequently to plan out large chunks of code or even as a quick way to write pseudocode and walk through it with other people (technical or not): code2flow
Yeap. I tracked down one of the most complex bugs of my career with: https://code2flow.com/
My usual process with bugs that involve understanding very complex interactions between multiple libraries / frameworks / services, while tracking state, side-effects etc. is to just write notes on a piece of paper, but when it gets really complex flow-charting can really help a lot. code2flow actually did an amazing job at flowcharting the super duper complex interactoin.