debugging: cleaning up stack capturemode