Skip to content

Timeout while using vscode debugger with Unicon #1271

@mmohdnowfal

Description

@mmohdnowfal

Environment data

  • debugpy version: 1.6.6
  • OS and version: Mac ventura 13.3
  • Python version : 3.10.9
  • Using VS Code or Visual Studio:
    VS Code
    Version: 1.77.2 (Universal)
    Commit: e344f1f539a80912a0e9357cec841f36ce97a4e2
    Date: 2023-04-06T10:12:31.126Z
    Electron: 19.1.11
    Chromium: 102.0.5005.196
    Node.js: 16.14.2
    V8: 10.2.154.26-electron.0
    OS: Darwin arm64 22.4.0
    Sandboxed: No

Actual behavior

This issue is similar to what is reported here.
But this time, it appears to be the issue is while using vscode debugger with any program which internally uses os.execv

We use a library called Unicon, for creating a connection to any remote device via ssh.
This library internally uses os.execv, which looks like has a conflict with debugpy(pyadev_monkey.py)

For every new process created using the above library, there is a delay of 5+ seconds and this delays the debugging process and affect the developer productivity time

Expected behavior

Should spawn the process wihout any delay

Steps to reproduce:

  1. Install the unicon library
    pip install pyats unicon
  2. Create the below data and python file
# Example
# -------
#
#   a simple pyATS testbed YAML file

devices:
    csr1000v-1:
        type: router
        os: iosxe
        credentials:
            default:
                password: foo
                username: foo
            enable:
                password: foo
        connections:
            cli:
                protocol: ssh
                ip: 168.10.1.35
  1. Create a python script
from pyats.topology import loader

testbed = loader.load('my-testbed.yaml')

device = testbed.devices['csr1000v-1']

device.connect()
device.execute('show version')

More info: https://developer.cisco.com/docs/unicon/
6. Run the debug mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions