PowerShell / vscode-powershell

Provides PowerShell language and debugging support for Visual Studio Code
https://marketplace.visualstudio.com/items/ms-vscode.PowerShell
MIT License
1.69k stars 480 forks source link

Debug cannot read property 'onError' of undefined #1590

Closed carlocardella closed 5 years ago

carlocardella commented 5 years ago

Issue Description

Insiders only (works fine in Stable): every time I try to start a debug session (either press F5, or use the Start Debug command), regardless of the debug type I select (Interactive Sessions, or Current File etc...) I always get the error in the screenshot. I can reproduce with all extensions disabled (except Powershell of course), I tried to clean my C:\Users\carloc.vscode-insiders\extensions folder (basically reinstall the extensions from scratch) but the problem remains.

I use Code Insiders as my primary editor, I think I got this error the first time towards the end of last week but I don't have exact dates to confirm

image

Attached Logs

1540311154-1018dcff-3bc2-424c-a3bf-83841bbc9be21540311145453.zip

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.17763
VSCode 1.29.0-insider
PowerShell Extension Version 1.9.0

PowerShell Information

Name Value
PSVersion 5.1.17763.1
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.17763.1
BuildVersion 10.0.17763.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

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": [{
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell Launch Current File",
            "script": "${file}",
            "args": [],
            "cwd": "${file}"
        },
        {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell Launch Current File in Temporary Console",
            "script": "${file}",
            "args": [],
            "cwd": "${file}",
            "createTemporaryIntegratedConsole": true
        },
        {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell Launch Current File w/Args Prompt",
            "script": "${file}",
            "args": [
                "${command:SpecifyScriptArgs}"
            ],
            "cwd": "${file}"
        },
        {
            "type": "PowerShell",
            "request": "attach",
            "name": "PowerShell Attach to Host Process",
            "processId": "${command:PickPSHostProcess}",
            "runspaceId": 1
        },
        {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell Interactive Session",
            "cwd": ""
        }
    ]
}

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand) |Extension|Author|Version| |---|---|---| |arm-snippets|samcogan|1.3.7| |atom-material-theme|tobiasalthoff|1.5.0| |auto-close-tag|formulahendry|0.5.6| |auto-rename-tag|formulahendry|0.0.15| |azure-account|ms-vscode|0.4.3| |azurecli|ms-vscode|0.4.2| |azurerm-vscode-tools|msazurermtools|0.4.2| |beautify|HookyQR|1.4.6| |better-align|wwm|1.1.6| |Bookmarks|alefragnani|9.1.0| |bracket-pair-colorizer|CoenraadS|1.0.60| |change-case|wmaurer|1.0.0| |code-runner|formulahendry|0.9.4| |code-settings-sync|Shan|3.2.0| |code-spell-checker|streetsidesoftware|1.6.10| |copy-text|salbert|0.4.1| |csharp|ms-vscode|1.16.2| |csharpextensions|jchannon|1.3.0| |csharpfixformat|Leopotam|0.0.76| |cursor-tools|naumovs|2.0.0| |debugger-for-chrome|msjsdiag|4.10.2| |docomment|k--kato|0.1.2| |emoji-code|idleberg|0.7.2| |extension-manifest-editor|ms-devlabs|0.1.5| |file-icons|file-icons|1.0.16| |filter-line|everettjf|1.1.0| |gc-excelviewer|GrapeCity|2.1.26| |gitignore|codezombiech|0.5.0| |gitlens|eamodio|8.5.6| |highlight-bad-chars|wengerk|0.0.3| |highlight-matching-tag|vincaslt|0.6.2| |highlight-words|rsbondi|0.0.8| |hogwarts-colors-dark|CarloCardella|0.7.0| |indent4to2|Compulim|0.1.2| |JavaScriptSnippets|xabikos|1.7.1| |json-escaper|joshuapoehls|1.1.0| |linux-themes|SolarLiner|1.0.1| |LiveServer|ritwickdey|5.1.1| |LogFileHighlighter|emilast|2.4.2| |markdown-all-in-one|yzhang|1.6.2| |markdown-table-prettify|darkriszty|2.2.0| |material-icon-theme|PKief|3.6.0| |Material-theme|zhuangtongfa|2.17.4| |metago|metaseed|2.11.0| |mssql|ms-mssql|1.4.0| |new-moon-vscode|taniarascia|1.4.11| |notification-tester|svipben|2.0.1| |one-monokai|azemoh|0.3.7| |open-in-browser|techer|2.0.0| |partial-diff|ryu1kn|1.4.0| |path-intellisense|christian-kohler|1.4.2| |PowerShell|ms-vscode|1.9.0| |preview-vscode|searKing|1.4.4| |python|ms-python|2018.9.1| |rainbow-csv|mechatroner|0.7.1| |reg|ionutvmi|0.0.2| |seito-openfile|Fr43nk|1.8.1| |selectline-statusbar|tomoki1207|0.0.2| |seti-icons|qinjia|0.1.3| |shell-launcher|Tyriar|0.2.0| |sort-lines|Tyriar|1.7.0| |string-converter|adamwalzer|0.1.1| |sublime-commands|Zarel|0.1.0| |supersharp|craigthomas|0.1.4| |TabOut|albert|0.1.6| |team|ms-vsts|1.142.0| |text-marker|ryu1kn|1.9.0| |text-power-tools|qcz|1.2.1| |theme-dracula|dracula-theme|2.14.1| |Theme-TomorrowKit|ms-vscode|0.1.4| |transformer|dakara|1.6.0| |tslint|eg2|1.0.40| |txt-syntax|xshrim|0.0.3| |typescript-hero|rbbit|3.0.0| |vsc-material-theme|Equinusocio|2.4.2| |vscode-csharp-snippets|jorgeserrano|0.3.1| |vscode-eslint|dbaeumer|1.6.1| |vscode-fileutils|sleistner|2.11.0| |vscode-format-context-menu|lacroixdavid1|1.0.4| |vscode-great-icons|emmanuelbeziat|2.1.44| |vscode-guid|heaths|1.4.0| |vscode-highlight|fabiospampinato|1.3.0| |vscode-icons|robertohuertasm|7.27.0| |vscode-insertdatestring|jsynowiec|2.2.3| |vscode-markdownlint|DavidAnson|0.20.0| |vscode-path-tools|cg-cnu|0.0.4| |vscode-pull-request-github|GitHub|0.2.1| |vscode-random|jrebocho|1.3.2| |vscode-simple-icons|LaurentTreguier|1.8.7| |vscode-simpler-icons|davidbabel|1.6.5| |vscode-smart-column-indenter|lmcarreiro|0.0.13| |vscode-theme-onedark|akamud|2.1.0| |vscode-theme-onelight|akamud|2.1.0| |vscode-todo-plus|fabiospampinato|4.9.2| |vscodeintellicode|VisualStudioExptTeam|1.0.5| |vsliveshare|ms-vsliveshare|0.3.834| |vsliveshare-audio|ms-vsliveshare|0.1.39| |wrapSelection|konstantin|0.6.8| |xml|DotJoshJohnson|2.3.2|;
TylerLeonhardt commented 5 years ago

This issue was moved to Microsoft/vscode#61649

jaroslavcervenka commented 5 years ago

I had the same error. Debugger started to work when extension VS Live Share has been disabled and VS code reloaded.

max-zaytsev commented 5 years ago

I had the same error. Debugger started to work when extension VS Live Share has been disabled and VS code reloaded.

I have the same issue now with VS Live Share installed when I start debugging powershell

SydneyhSmith commented 5 years ago

Looks like a VSCode issue https://github.com/Microsoft/vscode/issues/61649 that will be released soon.

fbehrens commented 5 years ago

I have experienced this issue in vscode 1.30.2.

In insiders it is fixed.