15
Views
14
Comments
Solved
How to debug microservice application?
Question

I have an microservice application with is switched in 3 eSpaces (Front, gateway, core). On Outsystems Debugger I can run it from FrontEnd to Gateway, but of the Gateway to Core doesn't work.

Anyone knows a way to do this?

obs: I'm using Outsystems 10.


Rank: #84
Solution

Hi Gabriel Melo,

I would suggest you try the below approach:
- For Temporary purpose: Consume any property like [ action/entity etc ] from Core in Front
- Wherever you want to debug on Core, just select the entry point as Front
- Start Debugger :)

Ref to debug Service Actions:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Troubleshooting_Applications/Debugging_Applications/Debugging_Producer_Modules


Service Actions

Unlike public Server Actions, Service Actions run in the context of the producer Module; to debug a Service Action, follow these steps:

  1. Open the producer Module and set the Entry Module to (this module).

    You can set the entry Module in the Debugger pane or in the Debugger menu, by choosing the "Select Entry Module..." option.

  2. Place breakpoints where you want the execution to stop. The execution will only stop on breakpoints of the producer Module.

  3. Start the debugger on the producer Module.




- Assif

Rank: #42100

Your first solution is a option, I use sometimes. Also timer is a option.

But in my case, my middleware (gateway) module is providing many data to core, he gets data from my frontend and also get more data from himself. So debug core and front directly will not work for me. 

About Service Actions, They work in Outsystems 10?

Hi Gabriel,

Have you selected the entry module before starting the debugger and also is the dependencies are updated?


Hope this helps you !!

Regards,

LK

Rank: #42100

Hi @Lakshmi Kumar Yadav,

This works just from frontend to gateway, when I do this from Core to Gateway doesn'work.

I want to do somenthing like this: Starts in FrontEnd -> pass in gateway -> to debug core server actions.

Gabriel, if you are using "Service actions" then it doesn't required entry point.

Rank: #42100

I'm using "Server Actions". Does Outsystems 10 has this funcionality?

Gabriel, this link  might help you on microservices.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Troubleshooting_Applications/Debugging_Applications/Debugging_Producer_Modules

Rank: #42100
Rank: #84
Solution

Hi Gabriel Melo,

I would suggest you try the below approach:
- For Temporary purpose: Consume any property like [ action/entity etc ] from Core in Front
- Wherever you want to debug on Core, just select the entry point as Front
- Start Debugger :)

Ref to debug Service Actions:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Troubleshooting_Applications/Debugging_Applications/Debugging_Producer_Modules


Service Actions

Unlike public Server Actions, Service Actions run in the context of the producer Module; to debug a Service Action, follow these steps:

  1. Open the producer Module and set the Entry Module to (this module).

    You can set the entry Module in the Debugger pane or in the Debugger menu, by choosing the "Select Entry Module..." option.

  2. Place breakpoints where you want the execution to stop. The execution will only stop on breakpoints of the producer Module.

  3. Start the debugger on the producer Module.




- Assif

Rank: #42100

Your first solution is a option, I use sometimes. Also timer is a option.

But in my case, my middleware (gateway) module is providing many data to core, he gets data from my frontend and also get more data from himself. So debug core and front directly will not work for me. 

About Service Actions, They work in Outsystems 10?

Rank: #129

Hi,

I'm not sure, do you mean you want to debug the Core?  For that you have to specify the entry module, but your gateway is not the entry, your front is.  Im I reading your question right ?

This is a bug in OS, when you want to choose the entry module from the dropdown, it will only let you select other modules that have a direct dependency on the module you want to debug.

The trick is to add at least one dependency to core in front.  You don't have to use it, just add it.  I like to use something like a dummy structure for this, so it is clear that there is no real dependency, only intended for debug.


Good luck,

Dorine


EDIT : ah, too late, so yes, exactly as Assif tiger is saying

Rank: #42100

Hi @Dorine Boudry, you readed right, is exactly like this.

Yeah, sounds like the only option is consume the third module directly without passing gateway.

Rank: #129


Gabriel,

you're not understanding our answer, I think.

the adding of the dependency is only a trick.  But you can still debug the core action while it is being called through the gateway, with all the extra data your gateway is adding.

Rank: #84

Ya unfortunately that's the issue with OS-11 as well, sometimes unnecessarily we have to add a direct dependency to modules for just the sake of a Debug.

Rank: #42100

Oh, now I understud.

I was thinking that my gateway would stay out of the flow, but no. I made the test consuming core module in front module and worked fine! All my middleware(gateway) data was passed to core.

Thank you guys!

Rank: #84