小编Mar*_*sen的帖子

无法在 Visual Studio 2022 中启动调试适配器

如果我创建一个启用了 Docker 支持的 ASP Core MVC(目标框架 5.0)并启动它,我会得到:

发生一个或多个错误。无法启动调试适配器。输出窗口中可能提供其他信息。操作已取消。

这是调试输出:

在此输入图像描述

启用 DebugAdapterHost.Logging

DebugAdapterHost.Logging /On /OutputWindow
Run Code Online (Sandbox Code Playgroud)

给出以下输出:

1> DebugAdapterHost version: 16.9.50429.2 commit:ca34bde2a8dfef71e1d0b3bafd2804978bfbe6a9
 1> Starting 'docker' with arguments 'exec -i 7ce0da2e24860812b487ef583433deee7b411229b69c5631dc73027fd0864f1f /bin/sh -c "ID=.; if [ -e /etc/os-release ]; then . /etc/os-release; fi; if [ $ID = alpine ] && [ -e /remote_debugger/linux-musl-x64/vsdbg ]; then VSDBGPATH=/remote_debugger/linux-musl-x64; else VSDBGPATH=/remote_debugger; fi; $VSDBGPATH/vsdbg --interpreter=vscode"'
 1> [DebugAdapter] --> C (initialize-1): {"type":"request","command":"initialize","arguments":{"pathFormat":"path","clientID":"visualstudio","clientName":"Visual Studio","adapterID":"coreclr","locale":"en-US","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsRunInTerminalRequest":true,"supportsMemoryReferences":true,"supportsProgressReporting":true,"SupportsMessageBox":true,"supportsHandshakeRequest":true,"supportsVsAdditionalBreakpointBinds":true,"supportsHitCountsChange":true,"supportsVsCustomMessages":true,"supportsVariableEnumerators":true},"seq":1}
 1> ERROR: Debug adapter error output: /bin/sh: 1: /remote_debugger/vsdbg: not found
 1> ERROR: …
Run Code Online (Sandbox Code Playgroud)

.net docker asp.net-core docker-desktop visual-studio-2022

14
推荐指数
2
解决办法
2万
查看次数