Following this answer I was able to create a breakpoint in code.
func sayHello() {
raise(SIGTRAP) // programmatic breakpoint
kill(getpid(), SIGSTOP) // programmatic breakpoint
print("say hello")
}
Using either of those 2 functions stops execution and "say hello" never gets printed.
The same way I was able to programmatically create the breakpoints is there a way that I can programmatically create something else so that the execution can continue after either of those 2 breakpoints is hit?