Debugging over E-spaces

Debugging over E-spaces

  
Hi All,

We've got some issues with debugging webservices.

We have one E-space containing the functions to connect to a Web Service.
We have another E-space containging a Web frontend.
The Web frontend eventually calls a function from the Web Service E-space.

We would like to debug the interaction steps between the two E-spaces for the
Frontend currently ends up in a Time-out while there is no error logged.
The debugger can't seem to either
  • Jump to the referenced E-space and continue it's debugging actions there
  • Detect when both E-spaces are in debugging mode and with that knowledge continue debugging for the same (developer) username
What approach do we need to debug the two E-spaces in a successful manner?
Hi Eric,

To have an eSpace debugger working on an eSpace, you have to make sure all web requests are being done to the PTA of the eSpace. This means that all accesses are done to the URL http://<YOUR_SERVER>/<YOUR_USERNAME>/.... .

This means that in your situation, to debug the web service call, all you have to do is make sure your web front-end is invoking the web service of the second eSpace in the URL http://<YOUR_SERVER>/<YOUR_USERNAME>/.... . This can be done using the EnhancedWebReferences extension (to set the web service URL in runtime) and you can use the AddPersonalAreaToURLPath built-in action to add the PTA section to the URL automatically.

Regards,

Daniel Lourenço
OutSystems
Hi Eric,

If you are already using the Service Studio 5.0 it is very easy to do what you want.
Just open two Service Studios with each eSpace, place breakpoints in both and then use the "Debugger"->"Start Debugging in the Public Area" option.

This is a new feature that allows easy debugging of Web Services, Timers and Processes without using the workarounds mentioned by Daniel.

Note: by default on Run operations the debugging is now done automatically on both the PTA and Public Area.

Regards,
João Rosado
OutSystems
Hi Guys,

At first both thanks for your quick reply.
Both options look very good, unfortunately I haven't been able to successfully use either one of them.

@Daniel Lourenço
I'm currently using the external links to open the correct start page when a menu option is clicked.
I can't use navigations because this would give me cross references with my other E-spaces.

Unfortunately the link contents aren't of the expression type which blocks me from using the AddPersonalAreaToURLPath method.

Is there another way to link to an external website and make use of the AddPersonalAreaToUrlPath method?

@João Rosado
I've tried the "Start Debugging in the public area" to debug a Web Block that's in a different E-space than I'm starting out from.
I did the following:
  • I executed the Start Debugging in the public area in the E-space with the webblock I want to debug.
  • I running the calling E-space in both  the 'public area' (url without my name) and the 'private area' (url with my name)
The debugger didn't break at the referenced webblock in which I've placed a breakpoint in either one of the calls.
We're using Service Studio 5.0.2.12 with the Platform Server 5.0.2.10

Guys,

I have an almost identical situation in 5.1.0.17 .NET - Trying to get debug to 'hook' in both espaces as one calls the other:

Public Action in one eSpace called by invoking the action in another eSpace containing the web screen.  I can independently debug in either eSpace but not from one to the other.  I've tried starting debug in combinations of private and public areas to no luck.

Any suggestions?

Paul.
 

Hi Paul,

Let's say your scenario is:
eSpace A calls action X on eSpace B

If you want to debug action X in eSpace B, you may do the following:
  • Open eSpace B in Service Studio as this is the eSpace where the debugging will actually take place
  • Goto the eSpace menu and choose Select Entry eSpace
  • Select eSpace A
You should now be able to run or debug in public area action X of eSpace B, invoked in the context of eSpace A.

Does this fix your problem?

Best regards,
Miguel
Hi Paul

The scenario described by Miguel Ventura is valid when you want to debug a specific action from a producer eSpace while using it in a consumer eSpace.

If what you want to do is to debug logic from both the producer and the consumer eSpace (e.g. begin in the consumer, and Step Into the producer) then you need the scenario explained by João Rosado earlier in this thread. To make it more step-by-step here is how you do it:

  1. Open 2 Service Studios – one with the consumer and one with the producer;
  2. Publish both eSpaces – first the producer and then the consumer – so that the public area is equal to the eSpace you are trying to debug;
  3. In the producer eSpace, go to eSpace -> Select entry eSpace, and choose the consumer eSpace;
  4. In both eSpaces, go to Debugger -> Start Debugging in the Public Area;
  5. Click Run on both  Service Studios;
  6. Set all the breakpoints;
  7. Open the public area of the consumer eSpace in a web browser, and trigger the wanted logic.

When you do that, you will have two Service Studio windows, one with each eSpace. When you choose Step Into (or if you choose to continue until the next breakpoint, should you have one in the producer) in the consumer eSpace, debug will move to the producer eSpace. Attached flash video demos the behavior.
 
 
Open 2 Service Studios – one with the consumer and one with the producer;
Publish both eSpaces – first the producer and then the consumer – so that the public area is equal to the eSpace you are trying to debug;
In the producer eSpace, go to eSpace -> Select entry eSpace, and choose the consumer eSpace;
In both eSpaces, go to Debugger -> Start Debugging in the Public Area;
Click Run on both  Service Studios;
Set all the breakpoints;
Open the public area of the consumer eSpace in a web browser, and trigger the wanted logic.
 
Open 2 Service Studios – one with the consumer and one with the producer;
Publish both eSpaces – first the producer and then the consumer – so that the public area is equal to the eSpace you are trying to debug;
In the producer eSpace, go to eSpace -> Select entry eSpace, and choose the consumer eSpace;
In both eSpaces, go to Debugger -> Start Debugging in the Public Area;
Click Run on both  Service Studios;
Set all the breakpoints;
Open the public area of the consumer eSpace in a web browser, and trigger the wanted logic.