codelldb: Error launching terminal agent on Windows
Which OS: Windows Which VSCode version: 1.38.1 Which extension version: 1.3.0 Which adapter type: native Which LLDB version: lldb version 8.0.1
attempt to debug a standard cargo binary on windows with powershell as the terminal.
PS C:\Users\tyler\Code\guessing_game> & '
>> ' 'c:\Users\tyler\.vscode\extensions\vadimcn.vscode-lldb-1.3.0\adapter2\codelldb.exe' 'terminal-agent' '--port=53254'
& : The term '
' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:3
+ & '
+ ~
+ CategoryInfo : ObjectNotFound: (
:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
running the command myself properly and I get, as the window of opportunity passed evidenced by the debug console error below.
Error: Os { code: 10061, kind: ConnectionRefused, message: "No connection could be made because the target machine actively refused it." }
and in the Debug Console I get
Failed to redirect stdio to a terminal. (Internal debugger error: Terminal agent did not respond within the allotted time.)
Debuggee output will appear here.```
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (4 by maintainers)
Hi… There seems to be a resurgence of this issue:
Default host: x86_64-pc-windows-msvc installed toolchains
stable-x86_64-pc-windows-msvc nightly-x86_64-pc-windows-msvc
installed targets for active toolchain
i686-pc-windows-msvc x86_64-pc-windows-msvc
active toolchain
stable-x86_64-pc-windows-msvc (default) rustc 1.44.1 (c7087fe00 2020-06-17)
cargo 1.44.1 (88ba85757 2020-06-11)
Fixed in 1.4.1 actually.
To get rid of error messages when using PowerShell as a terminal shell in VSCode, you can set
"lldb.terminalPromptClear" : nullin user/workspace settings. Of course, this disables protection from junk input in the terminal (see above). Tradeoffs…I had the same problem. In launch.json, change the
"terminal":"integrated"to"terminal":"external". If it correctly works, add"terminal.integrated.shell.windows":"C:\\Windows\\System32\\cmd.exe"to settings.json. In my case it worked fine in “integrated” after adding in settings.json.See the following address. https://github.com/Microsoft/vscode/issues/22881