Format: application/x-python-code
1 o
2
3 ��h4 � @ sL d Z ddlZddlZddlZddlZddlZddlmZ dd� Zdd� Z dS )zFProvides facilities to dump all stacks of all threads in the process.
4 � N)�logc C s� t �� j} t�� }t�d|� t�� � � D ]3\}}|| krqt �
5 � D ]}|j| kr1|j}|j} nq"d }}d�
6 t�|��}t�d|||||� qt�d|� dS )zJDump stacks of all threads in this process, except for the current thread.z!Dumping stacks for process {0}...z <unknown>� z8Stack of thread {0} (tid={1}, pid={2}, daemon={3}):
7
8 {4}z(Finished dumping stacks for process {0}.N)� threading�current_thread�ident�os�getpidr �info�sys�_current_frames�items� enumerate�name�daemon�join� traceback�format_stack)�tid�pidZt_ident�frame�tZt_nameZt_daemon�stack� r �Kc:\Users\shubh\Videos\agent\nova\Lib\site-packages\debugpy/common/stacks.py�dump s.
9
10 �� r c s* � fdd�}t j|d�}d|_|�� dS )zKInvokes dump() on a background thread after waiting for the specified time.c s, t �� � zt� W d S t�� Y d S )N)�time�sleepr r Zswallow_exceptionr ��secsr r �dumper5 s
11
12 zdump_after.<locals>.dumper)�targetTN)r �Threadr �start)r r �threadr r r �
13 dump_after2 s r$ )
14 �__doc__r r
15 r r r Zdebugpy.commonr r r$ r r r r �<module> s !