Trying to check if a value already exists in fire base

Great.

Now step to the next instruction. You do that by tapping on the Step Over icon just above and to the left:

As you step forward it will go to the next instruction based on what the status of what the query receives.

ok i did that and it took me to the end at line 54

Step again.

it then goes back to where i called on that function when i press on the search button

What message did you get in the Console?

2021-12-17 22:17:41.644134-0700 RecipeBook[64093:790969] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics

(lldb)

Keep stepping… Trust me this will show you what is going on. BUT add another breakpoint on the line that says:

if querySnapshot!.documents.isEmpty {

Russell, do you have messenger. It would be heaps easier to talk you through this rather than typing all the time.