Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger times out if shell startup is "slow" #1579

Open
marcm-ml opened this issue May 7, 2024 · 0 comments
Open

Debugger times out if shell startup is "slow" #1579

marcm-ml opened this issue May 7, 2024 · 0 comments

Comments

@marcm-ml
Copy link

marcm-ml commented May 7, 2024

Environment data

  • debugpy version: v2024.6.0
  • OS and version: macos 14.4.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.10 CPython
  • Using VS Code or Visual Studio: VS Code

Actual behavior

Debugger never starts and shows "timeout" error window.
In the terminal output you can see that the debugger command has been "pasted"/send to the terminal but the terminal was not ready yet. Hence, the command is discarded.
Its very similar to the issue described here: microsoft/vscode-js-debug#1642

Expected behavior

Debugger waits for terminal to finish and then sends the command to the terminal.

Steps to reproduce:

  1. add a slow command to shell startup, e.g. "sleep 120" to ~/.zshrc or ~/.bashrc
  2. start any debug session with debugpy
  3. debugger will timeout

Background:

I have a zshrc setup that includes some startup scripts which usually take ~0.5-3 seconds. I've never found a satisfying workaround for this and many of the suggested solutions in the Issues in this repo never worked for me.

Current Workaround:

Currently, I am using a setting which works well enough for me
Here is the link to the vscode docs: https://code.visualstudio.com/docs/terminal/profiles#_configuring-the-taskdebug-profile
and here is the setting for me:

{ 
  "terminal.integrated.automationProfile.osx": {
    "path": "bash",
  },
}

However, I wish this extension/debugger would support the same solution as microsoft/vscode-js-debug#1642.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant