vscode-python: Allow users to set the timeout for debugger connection. (Debugging with compound launch configs occasionally fails `Timeout Waiting for Debugger...` message)

Environment data

  • VS Code version: 1.28.0-insider
  • Extension version (available under the Extensions sidebar): 2018.8.0
  • OS and version: Windows 10 1803
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
  • Relevant/affected Python packages and their versions: nameko-2.11.0

Actual behavior

Debugger often fails with a timeout error when launching more than one project using the nameko framework. A Reload Window must be performed before debugging multiple projects at once will work.

Expected behavior

Debugger should reliably start and enter a debug session for all nameko-based microservice projects.

Steps to reproduce:

  1. Create a new workspace
  2. Add a folder to the workspace, with a virtual environment (venv)
  3. Use pip to install nameko in the project folder
  4. Repeat the process with a second project/folder in the workspace
  5. Configure the launch.json for each project, adding gevent: true
  6. Write a stub service both projects
  7. Create a workspace launch configuration which launches both projects
  8. Hit F5. With a bit of luck, both projects will start
  9. Stop both projects
  10. Hit F5 again.
  11. Repeat 8-10 until one project fails to start (Timeout waiting for debugger connection message)
  12. Hit Ctrl+Shift+P and choose Reload Project Window
  13. Hit F5 again - note that both projects start successfully.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

##########Linting Output - pylint##########
************* Module service
27,27,error,E1101:Instance of 'RpcProxy' has no 'execute' member
27,8,warning,W0612:Unused variable 'existing_project'
34,24,error,E1136:Value 'self.config' is unsubscriptable
35,8,error,E1101:Instance of 'RpcProxy' has no 'execute' member
39,27,error,E1136:Value 'self.config' is unsubscriptable
40,23,error,E1101:Instance of 'RpcProxy' has no 'get_connection' member

--------------------------------------------------------------------

Your code has been rated at -0.83/10 (previous run: -0.83/10, +0.00)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

TMSyntax.ts:47 Overwriting grammar scope name to file mapping for scope source.ruby.
Old grammar file: file:///c%3A/Users/chris.platts/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/extensions/ruby/syntaxes/ruby.tmLanguage.json.
New grammar file: file:///c%3A/Users/chris.platts/.vscode-insiders/extensions/rebornix.ruby-0.20.0/syntaxes/ruby.cson.json
e.register @ TMSyntax.ts:47
console.ts:136 [Extension Host] vscode-icons is active! (at activate (C:\Users\chris.platts\.vscode-insiders\extensions\robertohuertasm.vscode-icons-7.27.0\out\src\index.js:44:13))
console.ts:136 [Extension Host] Git extension API method 'getGitPath' is deprecated. (at c.r.value (c:\Users\chris.platts\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\extensions\git\dist\main.js:53:45010))

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 23

Commits related to this issue

Most upvoted comments

Marking this as needs decision and type-enhancement so the team can consider making this a documented feature for the debugger.

Hi Don,

I might’ve underplayed it a bit in the original report. This is happening much more regularly than ‘occasionally’. It’s reliably happening on every relaunch of a debug session after terminating the first session. The only workaround is to Reload Window.

Another thing I’ve noticed – the problem doesn’t appear to occur with the following chain of events:

  1. Start the compound debugging session (after launching vscode or reloading the window).
  2. Choose one of the projects from the debug dropdown and relaunch (Ctrl+Shift+F5) just that one project.
  3. Note that the project restarts and debugging behaves as normal.

However, if the entire debug session is stopped by hitting the red stop button on the debug toolbar multiple times to kill all sessions, then restarted with F5, the issue happens.