Why do you imply something is related to "debug code", if you haven't mentioned anything related to it before?
You mentioned that it works in a form but not in another form, so my first guess is that it migh be related to the order of units in your uses clause. Can you check if that's the case?
Sorry I left it too late to edit original post and perhaps didn't explain myself well enough in the second. I'd spent so long tracing down where the problem is in WebCore TWebSentry that I was probably a bit tired.
I shouldn't have said debug code, rather code used for compiling to a JS application and code referenced in the IDE.
In \XData\source\core\XData.Web.JsonDataset.pas TUpdateStatus is defined as:
However when the WebCore app is compiled only usModified, usInserted, usDeleted are recognised and the other three values raise the error of unrecognised.
The 3 recognised values are the ones defined in C:\DC\TMS\WEBCore\Core Source\RTL\Db.pas
So perhaps this is the problem. I tried putting DB after the others in the Uses clause but as C:\DC\TMS\XData\source\core\web\XData.Web.JsonDataset.pas (which I think is what is used for compiling - although not sure) doesn't contain the TUpdateStatus definition then that wouldn't matter.
I hope this explains the matter more clearly. For the moment the 3 available values are sufficient for the app I'm building.
Ah, ok. Yes, indeed that's the culprit. The extra enumerated values in TUpdateStatus are only visible in the "IDE code", and should not be there. We have fixed this internally and they won't be present in next version.