Skip to content

Initialize Python Interpreter failed #1424

Closed
@Arebusf21

Description

@Arebusf21

I have a clean install of Swift using the latest Winget Package Manager on Windows 10.
My build of VSCode is 1.98.0
Windows 10 build 19045.
I have installed the latest Swift and CodeLLDB extensions, (CodeLLDB installed by default) from VSCode.
Swift: 2.0.2, CodeLLDB: 1.11.4
I have created a default project using all the defaults, simply prints Hello, world to the terminal.
When I try and run the project, an external terminal window opens up but no output is produced.
I believe this is a similar issue to #309.
If I comment out the lldb.library line in settings.json, I see my output in the Terminal window.

Output Window:

Launching adapter
liblldb: C:\Users\Arebu\AppData\Local\Programs\Swift\Toolchains\6.0.2+Asserts\usr\bin\liblldb.dll
environment: {}
settings: { evaluateForHovers: true, commandCompletions: true }
[ERROR codelldb] Initialize Python interpreter: Error: Fail
Error Message:
error: module importing failed: Traceback (most recent call last):
File "", line 1, in
File "c:\Users/Arebu/.vscode/extensions/vadimcn.vscode-lldb-1.11.4/adapter/scripts\codelldb_init_.py", line 1, in
from .api import evaluate, wrap, unwrap, get_config, create_webview, display_html, debugger_message
File "c:\Users/Arebu/.vscode/extensions/vadimcn.vscode-lldb-1.11.4/adapter/scripts\codelldb\api.py", line 6, in
from . import interface
File "c:\Users/Arebu/.vscode/extensions/vadimcn.vscode-lldb-1.11.4/adapter/scripts\codelldb\interface.py", line 326, in
current_exec_context: lldb.SBExecutionContext | None = None
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

[ERROR codelldb::debug_session] Internal debugger error: Not supported in noDebug mode.
==== LLDB swift-healthcheck log. ===
This file contains the configuration of LLDB's embedded Swift compiler to help diagnosing module import and search path issues. The swift-healthcheck command is meant to be run after an error has occurred.
lldb version 17.0.6
Swift version 6.0.2 (swift-6.0.2-RELEASE)
Debug adapter exit code=0 (0x0), signal=null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CodeLLDBlldb or vscode-lldb issuebugSomething isn't workingdebuggingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions