Hi All,
The program runs but unable to debug,I have diabled chrome setting
Hey @Preeti zade ,
A 504 is almost always performance-related. So try to optimize SplitNames.
Thanks,
Sudip
I am able to debug in other system,so some settings may be causing issue.
@Preeti zade ,
my first guess is that you built an infinite loop in splitnames, can you share your OML ?
Dorine
Hi Dorine,
I am able to debug in my other machine/system.
Aah, i think i get it, you mean, while you are debugging, you run into that 504 ? And this doesn't happen on another machine for the same action ???
To be honest, i don't like/use the OutSystems debugger very much, for big / complex stuff, I am inclined towards oldschool console.logs on client and logmessage on server. So I hadn't noticed this limitation yet.
I tried by upping the timeout on that server call, or changing the short operations timeout preference, or putting the breakpoint at different spots, but it seems like the debugger has it's own idea about what an appropriate time to wait is. Sometimes, i can continue debugging after the error, sometimes not.
Maybe someone with more extensive debugging experience can chime in ?
Thank you,yes on other system it is working.
Hi @Preeti zade ,
Before digging into the details of the issue, I would like to understand why are we using server actions to split names? It could be easily done using JavaScript.
E.g., function splitName(fullName) { if (!fullName || typeof fullName !== "string") { return { firstName: "", middleName: "", lastName: "" }; } const parts = fullName.trim().split(/\s+/); // split by spaces let firstName = ""; let middleName = ""; let lastName = ""; if (parts.length === 1) { // Only one name firstName = parts[0]; } else if (parts.length === 2) { // First + Last firstName = parts[0]; lastName = parts[1]; } else { // First + Middle(s) + Last firstName = parts[0]; lastName = parts[parts.length - 1]; middleName = parts.slice(1, parts.length - 1).join(" "); } return { firstName, middleName, lastName };}``
I do not think the name split has some core business logic requirement, it feels to be a UI requirement and in that case why use server action instead of client JS.Cheers,Saugat