Hello,
I am running version 5.0.15.
I am trying to debug part of an app I wrote for internal use but I can’t seem to get the debugging working. Sadly, the help page for debugging an app doesn’t help me much either. The part I want to debug is this:
New-UDTextbox -Placeholder "UserID" -Id "UserID" -Style @{
'margin-top' = 10
}
New-UDButton -Id "Search" -Icon (New-UDIcon -Icon 'Search') -Text " Search" -ShowLoading -OnClick {
Sync-UDElement 'sync1'
} -Style @{
'margin-left' = 20;
'margin-right' = 20;
}
New-UDDynamic -Id 'sync1' -Content {
New-UDTransferList -Item {
$Server = "domain.name";
$ListItems = @();
$MemberOf = @();
$InputUserID = (Get-UDElement -ID "UserID").Value;
$Check = [System.String]::IsNullOrWhiteSpace($InputUserID);
if (-not $Check){
$ADUser = Get-ADUser -Server $Server -Identity $InputUserID -properties memberOf;
$MemberOf = $ADUser.memberOf;
}
Foreach($group in $MemberOf){
$Item = "";
$temp = "";
$temp = ($group.Split('='))[1];
$Item = ($temp.Split(','))[0];
if($group -like "D3T*"){$ListItems += $Item}
}
foreach($item in $ListItems){
New-UDTransferListItem -Name $item -value $item
}
} -Id "TransferList" -LeftTitle "Current groups" -RightTitle "Groups to remove" -Dense
}
To be more precise, I want to debug the if statement, as it does not seem to be working.
How should I go about debugging apps?