Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift Playground - How to use "thread return -x"

The following error was invoked when I wrote case 2841001 ... 393200 : I figured out my error (having an extra digit in the first number, copy paste error), but I would love to learn how to use "thread return -x", where do I configure that?

Playground execution aborted: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).
The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.
like image 953
Kukula Mula Avatar asked Apr 10 '16 09:04

Kukula Mula


1 Answers

I can't find an official document about this error message but my explanation is:

This is an LLDB error message, and we shouldn't see this in a Playground, because we don't have access to the debugger in a Playground.

In a regular Xcode project, we could use the debugger to navigate in the debug session, like:

(lldb) thread continue

But this is not possible in a Playground, so seeing this error in a Playground is, in my opinion, an Xcode bug.

like image 93
Eric Aya Avatar answered Nov 15 '22 04:11

Eric Aya