question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python: Attach using Process Id no longer prompting for process

See original GitHub issue

Environment data

  • VS Code version: Latest, I just reinstalled
  • Extension version (available under the Extensions sidebar): 2020.10.332292344
  • OS and version: Windows 10 64bit 1909 (upgraded to 20H2, same issue)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …):N/A
  • Relevant/affected Python packages and their versions: XXX
  • Relevant/affected Python-related VS Code extensions and their versions: XXX
  • Value of the python.languageServer setting: XXX

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Expected behaviour

Able to attach to ProcessID

launch.json: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 “version”: “0.2.0”, “configurations”: [ { “name”: “Python: Attach using Process Id”, “type”: “python”, “request”: “attach”, “processId”: “${command:pickProcess}” } ] }

Actual behaviour

Never get prompted to pick process. If I put the actual processID in the string it catches thebreakpoint.

Steps to reproduce:

enter the above then run the debugger

Logs

Nothing that seems relevant

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
karrtikrcommented, Nov 12, 2020

The next release will have the fix.

1reaction
karrtikrcommented, Nov 11, 2020

Upstream VSCode issue being tracked here: https://github.com/microsoft/vscode/issues/110432

As a workaround, please use VSCode version <=1.50

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode debugger attach to local process - Stack Overflow
The simplest way to begin debugging a Python file is to use the Run view and click the Run and Debug button. When...
Read more >
Debugging configurations for Python apps in Visual Studio Code
Selecting the Attach using Process ID one yields the following result: ... When no configuration has been set, you'll be given a list...
Read more >
Xcode: Could not attach to pid | Apple Developer Forums
Failure Reason: attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries when the attached ......
Read more >
How User Account Control works (Windows) | Microsoft Learn
A system service that helps start apps that require one or more elevated privileges or user rights to run, such as local administrative...
Read more >
How to get own process pid from the command prompt in ...
There was no way around then to handle the error when creating the temporary directory. Long story short, if you can assume that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found