You can use the path to the file found in your network tab to make sure you are editing the correct file.
This way you can be sure that you are editing the correct file. To agree with Ashik, I always do my de-bugging in the JS file that is served to the browser while working through a feature or a problem. But be sure to copy the work you do over to the file in your theme. When you run your
deploy commands, any work in the
pub/static/ folders will be lost.
Doing any file edits in production mode is going to be unreliable. I understand that M2 is very slow compared to some other systems, but it's really just to cost of the framework. I hate to say, but i don't think there is a predictable workflow for developing on production mode.
One idea comes from Alan Storm:
He is using redis to speed things up while developing.