An idea can't consider anything. The sentence doesn't make sense. You could say: While considering this, I realised I needed another approach. (= While I was considering this, I realised I needed another approach.)
What CB is telling you is that the subject of the nonfinite verb ('considering'), if it has none of its own, should be the same subject as the subject of the main verb ('I'), so your sentence has a 'dangling participle error', which is more critical than the comma use. (Use a comma if it helps clarify the sentence structure for the reader.)
Thank you Mister Micawber, I think I understand now. I've changed the second part of the sentence to: "I had another idea".
Regarding the comma, my understanding from your post is that it's not compulsary but can be used to make the sentence structure clearer. I don't have a good technical understanding of comma usage, I usually insert one where there is a natural pause, but in the exampl
I usually insert one where there is a natural pause -- A good guideline. There are some rules for commas, but no strict ones regarding fronted adverbials. (Your fronted clause, though, is long enough to deserve one).