Question: is there a way to see if the value is being read properly. I'm used to environments where you can debug, or use a "put" statement or something like that.
Usual for JavaScript console can be used, and the text is added to the log below the form layout area:
console.log( 'some text' );
Or a message box:
QMessageBox.information( 'Title', 'Information.' );