Displaying the Lock Call Stack

When the saving of the lock call stack for a process is enabled, you can display the call stack of a currently locked object of a process at the time it was locked. Any process can retrieve this information while the lock is held; for example, you can use it to help find and resolve locking problems during application development.

To display the lock call stack of a process

  1. Right-click on a locks view (for example, Persistent Locks) in the Locks activity group.

  2. Select the Show Lock Call Stack command from the popup menu that is then displayed.

The lock call stack for that process, if valid, is then displayed, as shown in the following image.

No variable values are available for display, as the code is no longer executing.

To display the lines of code for a method displayed in the list of locks for the current process

The code is then displayed in the editor pane below the list. (An error message is displayed if the lock call stack is not available.)