Format: application/x-python-code
⬇ Download File (1.5 KB)
   1  o
   2  
   3  ��h4�@sLdZddlZddlZddlZddlZddlZddlmZdd�Zdd�Z	dS)zFProvides facilities to dump all stacks of all threads in the process.
   4  �N)�logc	Cs�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�dumps.
   9  
  10  ��	rcs*�fdd�}tj|d�}d|_|��dS)zKInvokes dump() on a background thread after waiting for the specified time.cs,t���zt�WdSt��YdS)N)�time�sleeprrZswallow_exceptionr��secsrr�dumper5s
  11  
  12  zdump_after.<locals>.dumper)�targetTN)r�Threadr�start)rr�threadrrr�
  13  dump_after2sr$)
  14  �__doc__rr
  15  rrrZdebugpy.commonrrr$rrrr�<module>s!