Can a related paper cover the non-thesis master disadvantages for applying for a PhD? I am a MS student in computer science. I have the opportunity to work on the area A than I don't enjoy so much and the adviser is not helpful, but I guess that I will publish good papers if I work on that.

On the other hand, these days I spoke with a prof. Not in our university to suggest me a problem to work as independent research in the field B that I love so much. I guess that I am able to publish good papers in this new field too.

So I don't know if it is good to change my M.Sc. to non-thesis and pursue the independent research?

I should mention that regardless of my choice about my MS thesis I want to apply in the the field B for the universities in US.



Edit: Maybe it is good to mention that my bachelor record is good enough that if I had a little research on B in my bachelor It was possible for me to apply for direct PhD in B.

Edit2(clarification):
I am not inside US.I am from Asia actually.
I would recommend the independent research avenue because I always believe you should do the things you enjoy most. It shows strong interest in your future field and you will be better equipped to get your love for the field across when applying for a PhD/other.

Things to consider when making the final decision are: 


How much the non-thesis masters is valued in the US compared to the thesis one? 
The availability of the supervising Professor B
Your certainty in applying for field B.
The requirements wrt the masters listed on the websites of the universities you will apply to. 
The genuine likelihood of publications in your independent research into B
How much you dislike supervisor and topic A.