I frequently experienced a scenario where a question contains code which doesn't elicit the errors claimed by the asker. People are going back and forth in the comments and the OP insists that the code does what they claim, but it's apparently not the case.
Today I saw someone post an "answer" which was basically an MCVE of the code from the question proving that it works fine and doesn't throw any error.
A post like this can prove helpful in that it establishes and makes undeniable a problem with the question as it is presented, but to me this isn't really an answer and I'm not sure it's appropriate to put it there. Still, it's frequently what's needed to help draw out the real issue at hand. Is it acceptable to post something like that as an "answer"? If not, what is the best way to demonstrate something programmatically that's basically a comment, but isn't possible as a comment?
UPDATE: Since this has now been closed as a dupe of Should we have a more specific close reason for vague debugging questions? - allow me to clarify. I'm asking about how to best demonstrate code issues when that is your intention. This is not about closing debugging questions, it's about the tools we have available to engage in a dialog about code with the OP without using the answer format - since frequently these kinds of dialogs involve an exchange of information that may not qualify as an answer.