Skip to content

🍒 [lldb-dap][vscode][windows] check if Python is installed properly before starting lldb-dap (llvm#181124)#12909

Open
charles-zablit wants to merge 2 commits intoswiftlang:swift/release/6.4.xfrom
charles-zablit:charles-zablit/lldb-dap/vscode/windows/python-check-to-release-6.4.x
Open

🍒 [lldb-dap][vscode][windows] check if Python is installed properly before starting lldb-dap (llvm#181124)#12909
charles-zablit wants to merge 2 commits intoswiftlang:swift/release/6.4.xfrom
charles-zablit:charles-zablit/lldb-dap/vscode/windows/python-check-to-release-6.4.x

Conversation

@charles-zablit
Copy link
Copy Markdown

@charles-zablit charles-zablit commented May 7, 2026

@charles-zablit charles-zablit requested a review from a team as a code owner May 7, 2026 10:37
@charles-zablit
Copy link
Copy Markdown
Author

@swift-ci please test

@charles-zablit charles-zablit self-assigned this May 7, 2026
Implement [`[RFC] Add a Python check command to lldb-dap and
lldb`](https://discourse.llvm.org/t/rfc-add-a-python-check-command-to-lldb-dap-and-lldb/88972).

This patch adds the `--check-python` flag to `lldb-dap` on Windows, to
allow dap clients to verify the correct Python version is available
before trying to start `lldb-dap`.

Depends on:
- llvm#180786

rdar://165442474
(cherry picked from commit 8d34f28)
@charles-zablit charles-zablit force-pushed the charles-zablit/lldb-dap/vscode/windows/python-check-to-release-6.4.x branch from 781bff9 to 5297dd0 Compare May 7, 2026 12:17
@charles-zablit
Copy link
Copy Markdown
Author

@swift-ci please test

@charles-zablit
Copy link
Copy Markdown
Author

@swift-ci please test

@charles-zablit charles-zablit force-pushed the charles-zablit/lldb-dap/vscode/windows/python-check-to-release-6.4.x branch from 5297dd0 to ec5a598 Compare May 7, 2026 17:25
@charles-zablit
Copy link
Copy Markdown
Author

@swift-ci please test macos

"Python is not installed correctly. Please install it to use lldb-dap.",
{
modal: true,
detail: pythonCheckProcess.stderr?.toString() ?? "",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the stderr suggest a remedy? If not is there documentation published anywhere with minimum versions, etc? We sometimes over a notification button that when clicked opens documentation

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what it currently looks like:

Screenshot 2026-05-01 at 17 15 15

In Swiftlang, we also have a note that's displayed explaining to the user which version of Python to install and where to get it:

const std::string g_python_installation_note =
"Ensure Python " LLDB_PYTHON_VERSION " "
#if defined(_M_ARM64)
"(arm64)"
#elif defined(_M_AMD64)
"(x64)"
#endif
" is installed and available in your Path.\n"
"Pre-built binaries are available at "
#if defined(_M_ARM64)
"https://nuget.org (search 'python')\n";
#elif defined(_M_AMD64)
"https://python.org\n";
#endif

It's printed as an llvm::note which goes to stderr. The modal window above will have that additional text.

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

Successfully merging this pull request may close these issues.

2 participants