문제 (2.1)의 중단 점이 모든 예외 중단 점이었습니다. 내가 호출 한 메서드는 예외를 발생시켜 All Exceptions 중단 점이 발생했습니다. po
은 중단 점에 도달하면 실행을 중지합니다 (자세한 내용은 this answer 참조). 당신은 항상두면
error: Execution was interrupted, reason: signal SIGSTOP.
The process has been returned to the state before execution.
하면 브레이크 포인트가 활성화 된 모든 예외는, 다음 메시지가 모호 할 수 있습니다 : 당신이 중단 모든 예외를 해제하고 다시 실행하면
, 예외가 있다고 더 분명하다 : 실행 경로의 어딘가에 중단 점이 있었기 때문에 중단 점에 도달 했습니까? 예외가 발생 했습니까?
대안 솔루션 (All Exceptions 중단 점을 비활성화 할 필요가없는)은 po
대신 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 그 힌트입니다.