Format: application/x-python-code
1 o
2
3 ��h
4 � @ s@ d Z ddlZej�e�Zej�ej�ej�e���Zdd� ZdS )z?Script injected into the debuggee process during attach-to-PID.� Nc s� d }z�dd l � d� jvrXz?� fdd�}� fdd�}� fdd�}tj�td d
5 dd�}tj�|�s1J �� j�d|� dd l}|j |||d
6 � � j�
7 |� W n dd l}|�� � � j�dt� z#dd l
8 }dd l}ddlm} m} dd l}
9 W � jd tks~J �� jd= n� jd tks�J �� jd= w |
10 �� }|d ur�|jdd� | d d ur�|�| d � |�d| �| �� | d dkr�|�| d � n| d dkr�|j| d | d d� ntt| ���W n dd l}|�� |d u r� |�� Y |�d� d S )Nr � threadingc � t | � jd� d S �N)�file��print�stderr��msg��sys� �Xc:\Users\shubh\Videos\agent\nova\Lib\site-packages\debugpy/server/attach_pid_injected.py�on_warn � zattach.<locals>.on_warnc r r r r r r
11 r �on_exception r zattach.<locals>.on_exceptionc r r r r r r
12 r �on_critical r zattach.<locals>.on_critical�debugpyZ _vendored�pydevdZpydevd_attach_to_process)r r r )�json�logF)�wait�log_toz!Configuring injected debugpy: {0}�mode�listen�address�connectZadapter_access_token)Zaccess_tokenzdebugpy injected successfully)r �modules�os�path�join�_debugpy_dir�exists�insert�
13 attach_scriptZfix_main_thread_id�remove� traceback� print_excr Zdebugpy.serverZdebugpy.commonr r r Zget_global_debuggerZ#dispose_and_kill_all_pydevd_threadsr �info�reprr r �AssertionErrorZreraise_exception)�setupr r r r Zpydevd_attach_to_process_pathr$ r&