VSCode Ansible 语言扩展 Python 未加载

VSCode Ansible 语言扩展 Python 未加载

我正在尝试为 VS-Code 安装“Ansible Language”扩展:

它会自动安装以下扩展作为依赖项:Jupyter、Pylance、Python 和 YAML

但是,Python 扩展会尝试无限加载,从而完全阻止 pylance、Ansible 以及可能的其他扩展加载。

否则,我的 VS-Code 安装是最新的并且非常标准。

我希望有人能帮助我让这个扩展最终正常运行。

我的settings.json

{
    "editor.fontFamily": "Cascadia Code PL",
    "editor.fontLigatures": true,
    "editor.codeLensFontFamily": "Cascadia Code PL",
    "terminal.integrated.fontFamily": "Cascadia Code PL",
    "terminal.integrated.tabs.enabled": true,
    "git.autofetch": true,
    "git.enableSmartCommit": true,
    "git.confirmSync": false,
    "workbench.colorTheme": "Atom One Dark",
    "workbench.iconTheme": "vscode-icons",
    "workbench.productIconTheme": "fluent-icons",
    "security.workspace.trust.untrustedFiles": "open",
    "editor.renderControlCharacters": true
}

一些截图:

打开 Ansible .yml 文件 错误信息 运行扩展

错误消息 Python unresponsive.cpuprofile.txt

{
    "nodes": [
        {
            "id": 1,
            "callFrame": {
                "functionName": "(root)",
                "scriptId": "0",
                "url": "",
                "lineNumber": -1,
                "columnNumber": -1
            },
            "hitCount": 0,
            "children": [
                2
            ]
        },
        {
            "id": 2,
            "callFrame": {
                "functionName": "iterEnvs",
                "scriptId": "592",
                "url": "file:///c:/Users/USER/.vscode/extensions/ms-python.python-2021.6.944021595/out/client/extension.js",
                "lineNumber": 8,
                "columnNumber": 376073
            },
            "hitCount": 0,
            "children": [
                3
            ]
        },
        {
            "id": 3,
            "callFrame": {
                "functionName": "doIterEnvs",
                "scriptId": "592",
                "url": "file:///c:/Users/USER/.vscode/extensions/ms-python.python-2021.6.944021595/out/client/extension.js",
                "lineNumber": 58,
                "columnNumber": 751990
            },
            "hitCount": 0,
            "children": [
                4
            ]
        },
        {
            "id": 4,
            "callFrame": {
                "functionName": "iterFromCache",
                "scriptId": "592",
                "url": "file:///c:/Users/USER/.vscode/extensions/ms-python.python-2021.6.944021595/out/client/extension.js",
                "lineNumber": 58,
                "columnNumber": 752993
            },
            "hitCount": 0,
            "children": [
                5
            ]
        },
        {
            "id": 5,
            "callFrame": {
                "functionName": "t.getQueryFilter",
                "scriptId": "592",
                "url": "file:///c:/Users/USER/.vscode/extensions/ms-python.python-2021.6.944021595/out/client/extension.js",
                "lineNumber": 8,
                "columnNumber": 255372
            },
            "hitCount": 0,
            "children": [
                6
            ]
        },
        {
            "id": 6,
            "callFrame": {
                "functionName": "",
                "scriptId": "592",
                "url": "file:///c:/Users/USER/.vscode/extensions/ms-python.python-2021.6.944021595/out/client/extension.js",
                "lineNumber": 8,
                "columnNumber": 255571
            },
            "hitCount": 0,
            "children": [
                7
            ]
        },
        {
            "id": 7,
            "callFrame": {
                "functionName": "",
                "scriptId": "592",
                "url": "file:///c:/Users/USER/.vscode/extensions/ms-python.python-2021.6.944021595/out/client/extension.js",
                "lineNumber": 8,
                "columnNumber": 255694
            },
            "hitCount": 18507,
            "positionTicks": [
                {
                    "line": 9,
                    "ticks": 18507
                }
            ]
        }
    ],
    "startTime": 356119559705,
    "endTime": 356125053721,
    "samples": [
        7,
        7,
        7,


        [...]

        
        213,
        177
    ]
}

错误消息 YAML unresponsive.cpuprofile.txt(在第 500 行显示)

{
    "nodes": [
        {
            "id": 1,
            "callFrame": {
                "functionName": "(root)",
                "scriptId": "0",
                "url": "",
                "lineNumber": -1,
                "columnNumber": -1
            },
            "hitCount": 0,
            "children": [
                2,
                1541
            ]
        },
        {
            "id": 2,
            "callFrame": {
                "functionName": "processTicksAndRejections",
                "scriptId": "23",
                "url": "internal/process/task_queues.js",
                "lineNumber": 64,
                "columnNumber": 34
            },
            "hitCount": 0,
            "children": [
                3
            ]
        },
        {
            "id": 3,
            "callFrame": {
                "functionName": "runMicrotasks",
                "scriptId": "0",
                "url": "",
                "lineNumber": -1,
                "columnNumber": -1
            },
            "hitCount": 0,
            "children": [
                4
            ]
        },
        {
            "id": 4,
            "callFrame": {
                "functionName": "_activateExtension",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 88,
                "columnNumber": 11478
            },
            "hitCount": 0,
            "children": [
                5
            ]
        },
        {
            "id": 5,
            "callFrame": {
                "functionName": "_doActivateExtension",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 88,
                "columnNumber": 12204
            },
            "hitCount": 0,
            "children": [
                6
            ]
        },
        {
            "id": 6,
            "callFrame": {
                "functionName": "_loadCommonJSModule",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 102,
                "columnNumber": 25665
            },
            "hitCount": 0,
            "children": [
                7
            ]
        },
        {
            "id": 7,
            "callFrame": {
                "functionName": "t",
                "scriptId": "111",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/loader.js",
                "lineNumber": 4,
                "columnNumber": 70
            },
            "hitCount": 0,
            "children": [
                8
            ]
        },
        {
            "id": 8,
            "callFrame": {
                "functionName": "require",
                "scriptId": "79",
                "url": "internal/modules/cjs/helpers.js",
                "lineNumber": 86,
                "columnNumber": 30
            },
            "hitCount": 0,
            "children": [
                9
            ]
        },
        {
            "id": 9,
            "callFrame": {
                "functionName": "Module.require",
                "scriptId": "75",
                "url": "internal/modules/cjs/loader.js",
                "lineNumber": 997,
                "columnNumber": 35
            },
            "hitCount": 0,
            "children": [
                10
            ]
        },
        {
            "id": 10,
            "callFrame": {
                "functionName": "c._load",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 92,
                "columnNumber": 59125
            },
            "hitCount": 0,
            "children": [
                11
            ]
        },
        {
            "id": 11,
            "callFrame": {
                "functionName": "E._load",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 102,
                "columnNumber": 24379
            },
            "hitCount": 0,
            "children": [
                12
            ]
        },
        {
            "id": 12,
            "callFrame": {
                "functionName": "n._load",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 102,
                "columnNumber": 27543
            },
            "hitCount": 0,
            "children": [
                13
            ]
        },
        {
            "id": 13,
            "callFrame": {
                "functionName": "f._load",
                "scriptId": "98",
                "url": "electron/js2c/asar_bundle.js",
                "lineNumber": 4,
                "columnNumber": 12664
            },
            "hitCount": 0,
            "children": [
                14
            ]
        },
        {
            "id": 14,
            "callFrame": {
                "functionName": "Module._load",
                "scriptId": "75",
                "url": "internal/modules/cjs/loader.js",
                "lineNumber": 757,
                "columnNumber": 23
            },
            "hitCount": 0,
            "children": [
                15
            ]
        },
        {
            "id": 15,
            "callFrame": {
                "functionName": "Module.load",
                "scriptId": "75",
                "url": "internal/modules/cjs/loader.js",
                "lineNumber": 969,
                "columnNumber": 32
            },
            "hitCount": 0,
            "children": [
                16
            ]
        },
        {
            "id": 16,
            "callFrame": {
                "functionName": "Module._extensions..js",
                "scriptId": "75",
                "url": "internal/modules/cjs/loader.js",
                "lineNumber": 1134,
                "columnNumber": 36
            },
            "hitCount": 0,
            "children": [
                17
            ]
        },
        {
            "id": 17,
            "callFrame": {
                "functionName": "u._compile",
                "scriptId": "111",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/loader.js",
                "lineNumber": 3,
                "columnNumber": 951
            },
            "hitCount": 0,
            "children": [
                18
            ]
        },
        {
            "id": 18,
            "callFrame": {
                "functionName": "",
                "scriptId": "287",
                "url": "file:///c:/Users/USER/.vscode/extensions/redhat.vscode-yaml-0.20.0/out/src/extension.js",
                "lineNumber": 0,
                "columnNumber": 10
            },
            "hitCount": 1,
            "children": [
                19
            ],
            "positionTicks": [
                {
                    "line": 23,
                    "ticks": 1
                }
            ]
        },
        {
            "id": 19,
            "callFrame": {
                "functionName": "v",
                "scriptId": "111",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/loader.js",
                "lineNumber": 3,
                "columnNumber": 680
            },
            "hitCount": 0,
            "children": [
                20
            ]
        },
        {
            "id": 20,
            "callFrame": {
                "functionName": "Module.require",
                "scriptId": "75",
                "url": "internal/modules/cjs/loader.js",
                "lineNumber": 997,
                "columnNumber": 35
            },
            "hitCount": 0,
            "children": [
                21
            ]
        },
        {
            "id": 21,
            "callFrame": {
                "functionName": "c._load",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 92,
                "columnNumber": 59125
            },
            "hitCount": 0,
            "children": [
                22
            ]
        },
        {
            "id": 22,
            "callFrame": {
                "functionName": "E._load",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 102,
                "columnNumber": 24379
            },
            "hitCount": 0,
            "children": [
                23
            ]
        },
        {
            "id": 23,
            "callFrame": {
                "functionName": "n._load",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 102,
                "columnNumber": 27543
            },
            "hitCount": 0,
            "children": [
                24
            ]
        },
        {
            "id": 24,
            "callFrame": {
                "functionName": "f._load",
                "scriptId": "98",
                "url": "electron/js2c/asar_bundle.js",
                "lineNumber": 4,
                "columnNumber": 12664
            },
            "hitCount": 0,
            "children": [
                25
            ]
        },
        {
            "id": 25,
            "callFrame": {
                "functionName": "Module._load",
                "scriptId": "75",
                "url": "internal/modules/cjs/loader.js",
                "lineNumber": 757,
                "columnNumber": 23
            },
            "hitCount": 1,
            "children": [
                26,
                1450
            ],
            "positionTicks": [
                {
                    "line": 798,
                    "ticks": 1
                }
            ]
        },
        {
            "id": 26,
            "callFrame": {
                "functionName": "Module.load",
                "scriptId": "75",
                "url": "internal/modules/cjs/loader.js",
                "lineNumber": 969,
                "columnNumber": 32
            },
            "hitCount": 0,
            "children": [
                27,
                1466
            ]
        },
        {
            "id": 27,
            "callFrame": {
                "functionName": "Module._extensions..js",
                "scriptId": "75",
                "url": "internal/modules/cjs/loader.js",
                "lineNumber": 1134,
                "columnNumber": 36
            },
            "hitCount": 0,
            "children": [
                28,
                1471
            ]
        },
        {
            "id": 28,
            "callFrame": {
                "functionName": "u._compile",
                "scriptId": "111",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/loader.js",
                "lineNumber": 3,
                "columnNumber": 951
            },
            "hitCount": 2,
            "children": [
                29,
                1485,
                1487,
                1502,
                1504,
                1505,
                1506,
                1601,
                1612,
                1630,
                2695
            ],
            "positionTicks": [
                {
                    "line": 4,
                    "ticks": 2
                }
            ]
        },
        {
            "id": 29,
            "callFrame": {
                "functionName": "",
                "scriptId": "288",
                "url": "file:///c:/Users/USER/.vscode/extensions/redhat.vscode-yaml-0.20.0/node_modules/vscode-languageclient/node.js",
                "lineNumber": 0,
                "columnNumber": 10
            },
            "hitCount": 0,
            "children": [
                30
            ]
        },
        {
            "id": 30,
            "callFrame": {
                "functionName": "v",
                "scriptId": "111",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/loader.js",
                "lineNumber": 3,
                "columnNumber": 680
            },
            "hitCount": 0,
            "children": [
                31
            ]
        },
        {
            "id": 31,
            "callFrame": {
                "functionName": "Module.require",
                "scriptId": "75",
                "url": "internal/modules/cjs/loader.js",
                "lineNumber": 997,
                "columnNumber": 35
            },
            "hitCount": 0,
            "children": [
                32
            ]
        },
        {
            "id": 32,
            "callFrame": {
                "functionName": "c._load",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 92,
                "columnNumber": 59125
            },
            "hitCount": 0,
            "children": [
                33
            ]
        },
        {
            "id": 33,
            "callFrame": {
                "functionName": "E._load",
                "scriptId": "131",
                "url": "file:///c:/Users/USER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js",
                "lineNumber": 102,
                "columnNumber": 24379
            },
            "hitCount": 0,
            "children": [
                34
            ]
        },
        {
            "id": 34,
            "callFrame": {
                "functionName": "n._load",

其他已安装的扩展:

  • https://marketplace.visualstudio.com/items?itemName=
    • aaron-bond.更好的评论
    • CoenraadS.bracket-pair-colorizer-2
    • naumovs.颜色突出显示
    • oderwat.indent-彩虹
    • mechatroner.rainbow-csv
    • Tyriar.排序线
    • akamud.vscode-主题-onedark
    • miguelsolorio.fluent-图标
    • vscode-图标-团队.vscode-图标

相关内容