यह पता चला है कि प्रश्न में ब्रेकपॉइंट (2.1) सभी अपवाद ब्रेकपॉइंट था। जिस विधि को मैं बुला रहा था वह एक अपवाद उठाया, जिसने सभी अपवादों को तोड़ने का कारण बना दिया। ब्रेकपॉइंट पहुंचने के बाद po
निष्पादन रोक देगा (अधिक जानकारी के लिए this answer देखें)।
error: Execution was interrupted, reason: signal SIGSTOP.
The process has been returned to the state before execution.
आप हमेशा छोड़ देते हैं तो सभी अपवाद ब्रेकपाइंट सक्षम है, तो संदेश अस्पष्ट हो सकता है:
आप सभी अपवाद ब्रेकप्वाइंट को निष्क्रिय और इसे फिर से चलाते हैं, तो यह और अधिक स्पष्ट एक अपवाद था कि है: क्या यह ब्रेकपॉइंट तक पहुंच गया क्योंकि वास्तव में निष्पादन पथ के साथ कहीं ब्रेकपॉइंट था, या अपवाद उठाया गया था?
एक वैकल्पिक समाधान (जिसे सभी अपवाद ब्रेकपॉइंट को अक्षम करने की आवश्यकता नहीं है) के बजाय expr
का उपयोग करना है (निम्न झंडे के विवरण के लिए उपरोक्त लिंक देखें)।
expr -u 0 -o -- foo()
रनिंग निम्नलिखित उत्पादन का उत्पादन:
error: Execution was interrupted, reason: breakpoint 2.1 -2.1.
The process has been left at the point where it was interrupted.
* thread #1: tid = [...] libobjc.A.dylib`objc_exception_throw, stop reason = breakpoint 2.1 -2.1
frame #0: [...] libobjc.A.dylib`objc_exception_throw
objc_exception_throw
स्ट्रिंग है जिसमें exception was raised एक संकेत है।