If the jsx code error, the script does not take effect after the change, i must restart photoshop, reopen the cep expansion in order to properly execute the script.
E.g:
if i run this code:
console.log(app.activeDocument.activeLayer.textItem.contents)
jsx code can not be executed again after the next change