
    Mh                     J    d Z ddlZddlZddlZddlZddlZddlmZ d Zd Z	dS )zFProvides facilities to dump all stacks of all threads in the process.
    N)logc            	         t          j                    j        } t          j                    }t          j        d|           t          j                    	                                D ]\  }}|| k    rt          j
                    D ]}|j        | k    r|j        }|j        } ndx}}d                    t          j        |                    }t          j        d|||||           t          j        d|           dS )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}):

{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pidt_identframett_namet_daemonstacks           U/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/debugpy/common/stacks.pydumpr      s    
"
$
$
*C
)++CH0#666-//5577 
 
c>>$&& 	, 	,Aw#~~8 
 !,+FX	.u5566H	
 	
 	
 	
 H7=====    c                 r      fd}t          j        |          }d|_        |                                 dS )zKInvokes dump() on a background thread after waiting for the specified time.c                      t          j                    	 t                       d S #  t          j                     Y d S xY w)N)timesleepr   r   swallow_exception)secss   r   dumperzdump_after.<locals>.dumper5   sF    
4	$FFFFF	$!######s   ' ?)targetTN)r   Threadr   start)r%   r&   threads   `  r   
dump_afterr+   2   sI    $ $ $ $ $ V,,,FFM
LLNNNNNr   )
__doc__r	   r   r"   r   r   debugpy.commonr   r   r+    r   r   <module>r/      s   
  
			 



               > > >B    r   