Reputation: 19612
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?
Upvotes: 0
Views: 777
Reputation: 535606
The feature you're looking for is built in. Here's a breakpoint that prints "here" and continues:
Upvotes: 1