For ages I have used this rule of thumb:
Would be this question of any help for someone else?
If not, it's off-topic.
But recently the "too localized" term was removed from the close-vote reasons, and the rules are unclear and ambiguous as well: no doubt, for the OP their question is about "a specific problem they face" (otherwise they just wouldn't have asked it!), and they take this term as a perfect excuse for their "debug my code for me" questions.
So, the question is: is my old rule of thumb is still in effect? Are all questions that boil down to "I wrote some code but have no idea why doesn't it work, so tell me" (a.k.a. "Sometimes you need an extra pair of eyes.") still considered off-topic?
If not - is there any good rule in replace?