I just realized today that this thread has been lost when site was recovered from bkp.

This is the resulting conclusion of the issue starting with "invalid view object" errors being reported as part of webRegisterPath on mobile webapp, discussed here.

After several days, troubleshooting, and starting over the webapp project twice, and with Wil's assistance in background, we believe we got the reason.

Problem Statement:
Debugger changes the flow of the program execution.

Conditions:
  1. Breakpoint during objects creation phase.
  2. Special expressions in Watch window


Lets first perform a normal debuggin session, using webordermobile as an example:

1. Open WebOrderMobile workpace
2. Open WebApp.src source
3. place 2 breakpoints in oViewStack object and end_object
Code:
*     Object oViewStack is a cWebViewStack
        // use ghoWebViewStack to reference this object
*    End_Object
The * represents the breakpoints.
4. Run the webapp in debug mode.
5. on 1st breakpoint, press F10 (step over)
6. on 2nd breakpoint, press F11 (step into)

Result: End_Construct_Object of cWevViewStack is executed as expected !

Now, let's go for the issue:

1. Execute the webapp in debug mode again
2. when execution stops at the 1st breakpoint, insert the following expression inside Watches window:
Code:
(AppSynching(ghoWebApp))
Like picture bellow
Click image for larger version. 

Name:	df19.1_debugger_issue_pic1.PNG 
Views:	12 
Size:	76.2 KB 
ID:	13413
3. Press F10 (step over) in the 1st breakpoint to allow the program flow to continue.
4. Now, at 2nd breakpoint, press F11 (step into).

KABUM
Program execution flow is changed dramatically, End_Construct_Object is executed for cWebApp class, instead of cWebViewStack .

Click image for larger version. 

Name:	df19.1_debugger_issue_pic2.jpg 
Views:	10 
Size:	120.5 KB 
ID:	13414


------------------
Things that I could observe from my several testing:

1. If you never place a breakpoint during objects creation phase, but just inside procedures execution, and let all objects to be created normally, without debugger intervention, the issue does not happens. Even with the (AppSynching(ghoWebApp)) expression in watches window.

2. The Issue is triggered only if you use F10 or F11 in any breakpoints during objects creation phase. It does not need to be at these 2 particular lines.
Any other inner object , direct childs, and grand-childs, grand-gand-childs of oWebApp , with a breakpoint at some property declaration, Procedure Declaration, Object creation, or End_Object, will trigger the issue, if the expression is present in watches window.
But, again only trigger if you use F10 or F11. If you have the breakpoints, but if you use F5 instead, the issue does not happen.
In this case (F5), the End_Construct_Object procedure is executed properly for the correct class.

3. The issue is NOT restricted to the object where you placed the breakpoints.
ALL subsequent objects in the hierarchy will face the issue, after it has been triggered by the 1st time, untill all the rest of objects got fully created.

All of these, can be observed by enabling message tracing.


-------------

So, correlating this to my original post, when I was facing the invalid view Object errors.
That error, was just a bad consequence of this original issue, where the End_construct_Object of the cWebApp was being executed too early in the build process.
End_Construct_Object of cwebApp, should be executed just after all other webobjects has already being created.
This method, will trigger to validate all the webregisterpaths defined. so, as the views were not created yet at this point, the validation is executed too ealry, hence the invalid view error.


I have opened an HDE ticket for this.

Wil was able to reproduce the issue on his environment as well. Thanks again Wil !


Regards