How is your experience with the OutSystems Community?
18
Views
7
Comments
unable to debug

Hi All,

The program runs but unable to debug,I have diabled chrome setting


2023-09-06 07-26-35
Sudip Pal

Hey @Preeti zade ,

A 504 is almost always performance-related. So try to optimize SplitNames.

Thanks,

Sudip

UserImage.jpg
Preeti zade

I am able to debug in other system,so some settings may be causing issue.

2021-09-06 15-09-53
Dorine Boudry
 
MVP

@Preeti zade ,

my first guess is that you built an infinite loop in splitnames, can you share your OML ?

Dorine

UserImage.jpg
Preeti zade

Hi Dorine,

I am able to debug in my other machine/system.

SplitName.oml
2021-09-06 15-09-53
Dorine Boudry
 
MVP


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 ?

Dorine


UserImage.jpg
Preeti zade

Thank you,yes on other system it is working.

2026-03-20 01-28-51
Saugat Biswas

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.