I have a function with the statement:
const candidateParent = await getParentFromAncestor(candidateAncestor, node);
where
const getParentFromAncestor = async(potentialAncestor: ASTNode, potentialDescendant: ASTNode): Promise<ASTNode | null>
is a recursive function that traverses the tree of candidateAncestor's children to find node. This functions well in nearly all circumstances, but I have a situation in which after getParentFromAncestor() has conducted an unsuccessful search and unwound the recursive stack, it returns null and yet execution does not resume at the call site; things simply stall.
I have logs both just above the return null statement in getParentFromAncestor() and just after the statement at the call site, but only the former gets printed. Unfortunately, I cannot get VSCode to attach to the process in order to determine what is happening at the point of stalling (see: https://discord.com/channels/508357248330760243/1088992613081813164).
I would be extremely grateful for any assistance in the matter.