Is there a way to view the cancellation stack?

I will learn about the cancellation, and I would like to look at the cancellation ( NSInvocations) objects undoManagerso that I can see what is happening. I could not see anything like this in the docs, but maybe someone knows a way.

Thanks.

+3
source share
2 answers

you can use

class-dump -C NSUndo /System/Library/Frameworks/Foundation.framework/Foundation

to learn about the internal structure of classes related to cancellation. You will find that NSUndoManager has two instance variables named _undoStack and _redoStack. It's pretty obvious how it is structured, so you can write a small stack printing method. I found this very convenient for debugging undo issues.

+5

? Core Data / . NSUndoManager .

, , ? , . , , , , Apple . , .

+1

Source: https://habr.com/ru/post/1720160/


All Articles