VSCode 无法连接到我的 WSL2 发行版

问题描述 投票:0回答:1

由于某种原因,我的 vscode 无法连接到 WSL。我使用的是 Debian,它在 WSL2 上运行。每次尝试连接时,连接都会超时。

这是错误日志

log.ts:417  INFO Invoking resolveAuthority(wsl)...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,1)][0ms] obtaining proxy...
log.ts:417  INFO Started local extension host with pid 13520.
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,1)][619ms] invoking...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,1)][1138ms] returned WebSocket(127.0.0.1:5017)
log.ts:417  INFO resolveAuthority(wsl) returned 'WebSocket(127.0.0.1:5017)' after 1138 ms
log.ts:417  INFO Creating a socket (renderer-Management-c328b16e-5ddb-4024-9b09-3c2ce21eec5e)...
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-783c5459-fc5c-4a31-bd60-62e7b7312659)...
log.ts:417  INFO Creating a socket (renderer-Management-c328b16e-5ddb-4024-9b09-3c2ce21eec5e) was successful after 146 ms.
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-783c5459-fc5c-4a31-bd60-62e7b7312659) was successful after 254 ms.
log.ts:437   ERR [remote-connection][Management   ][c328b…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 1] An error occurred in initial connection! Will retry... Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:417  INFO Invoking resolveAuthority(wsl)...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,2)][0ms] obtaining proxy...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,2)][1ms] invoking...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,2)][2ms] returned WebSocket(127.0.0.1:5017)
log.ts:417  INFO resolveAuthority(wsl) returned 'WebSocket(127.0.0.1:5017)' after 2 ms
log.ts:417  INFO Creating a socket (renderer-Management-ac0b3553-66a4-4231-af6b-90ac6dee8d22)...
log.ts:437   ERR [remote-connection][ExtensionHost][783c5…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 1] An error occurred in initial connection! Will retry... Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-9c07e418-7167-44a5-ac03-f2e47e4ba0a7)...
log.ts:417  INFO Creating a socket (renderer-Management-ac0b3553-66a4-4231-af6b-90ac6dee8d22) was successful after 98 ms.
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-9c07e418-7167-44a5-ac03-f2e47e4ba0a7) was successful after 121 ms.
log.ts:437   ERR [remote-connection][Management   ][ac0b3…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 2] An error occurred in initial connection! Will retry... Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:417  INFO Invoking resolveAuthority(wsl)...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,3)][0ms] obtaining proxy...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,3)][0ms] invoking...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,3)][2ms] returned WebSocket(127.0.0.1:5017)
log.ts:417  INFO resolveAuthority(wsl) returned 'WebSocket(127.0.0.1:5017)' after 2 ms
log.ts:417  INFO Creating a socket (renderer-Management-d1cf3ca6-dcee-4dd1-8242-1124ba140f69)...
log.ts:437   ERR [remote-connection][ExtensionHost][9c07e…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 2] An error occurred in initial connection! Will retry... Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-6d8382a4-bf22-4e12-b96a-ad1b1fb99de7)...
log.ts:417  INFO Creating a socket (renderer-Management-d1cf3ca6-dcee-4dd1-8242-1124ba140f69) was successful after 96 ms.
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-6d8382a4-bf22-4e12-b96a-ad1b1fb99de7) was successful after 118 ms.
extensionDescriptionRegistry.ts:369 The customer named _initialize has been holding on to the lock for 30s. This might be a problem.
(anonymous) @ extensionDescriptionRegistry.ts:369
log.ts:437   ERR [remote-connection][Management   ][d1cf3…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 3] An error occurred in initial connection! Will retry... Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:417  INFO Invoking resolveAuthority(wsl)...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,4)][0ms] obtaining proxy...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,4)][1ms] invoking...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,4)][3ms] returned WebSocket(127.0.0.1:5017)
log.ts:417  INFO resolveAuthority(wsl) returned 'WebSocket(127.0.0.1:5017)' after 3 ms
log.ts:417  INFO Creating a socket (renderer-Management-4ef56539-2bfd-4d79-9134-85b9a4c7db63)...
log.ts:417  INFO Creating a socket (renderer-Management-4ef56539-2bfd-4d79-9134-85b9a4c7db63) was successful after 96 ms.
log.ts:437   ERR [remote-connection][ExtensionHost][6d838…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 3] An error occurred in initial connection! Will retry... Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-f8057a40-e307-4209-955a-8e60bef15ae7)...
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-f8057a40-e307-4209-955a-8e60bef15ae7) was successful after 163 ms.
log.ts:437   ERR [remote-connection][Management   ][4ef56…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 4] An error occurred in initial connection! Will retry... Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:417  INFO Invoking resolveAuthority(wsl)...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,5)][0ms] obtaining proxy...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,5)][1ms] invoking...
log.ts:417  INFO [LocalProcess0][resolveAuthority(wsl,5)][2ms] returned WebSocket(127.0.0.1:5017)
log.ts:417  INFO resolveAuthority(wsl) returned 'WebSocket(127.0.0.1:5017)' after 3 ms
log.ts:417  INFO Creating a socket (renderer-Management-646b82fc-400d-4be7-98de-5d1a1c0f951f)...
log.ts:417  INFO Creating a socket (renderer-Management-646b82fc-400d-4be7-98de-5d1a1c0f951f) was successful after 93 ms.
log.ts:437   ERR [remote-connection][ExtensionHost][f8057…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 4] An error occurred in initial connection! Will retry... Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-1478c627-e3c2-4c68-8ad5-99f77fca4cb2)...
log.ts:417  INFO Creating a socket (renderer-ExtensionHost-1478c627-e3c2-4c68-8ad5-99f77fca4cb2) was successful after 111 ms.
log.ts:437   ERR [remote-connection][Management   ][646b8…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 5]  An error occurred in initial connection! It will be treated as a permanent error. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR Cannot register remote filesystem provider. Error while fetching remote environment. Time limit reached
notificationsAlerts.ts:42 Failed to connect to the remote extension host server (Error: Time limit reached)
c @ notificationsAlerts.ts:42
(anonymous) @ notificationsAlerts.ts:28
y @ event.ts:1127
z @ event.ts:1138
fire @ event.ts:1162
addNotification @ notifications.ts:228
notify @ notificationService.ts:253
prompt @ notificationService.ts:331
(anonymous) @ remoteAgentService.ts:68
4log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
notificationsAlerts.ts:42 Could not fetch remote environment
c @ notificationsAlerts.ts:42
(anonymous) @ notificationsAlerts.ts:28
y @ event.ts:1127
z @ event.ts:1138
fire @ event.ts:1162
addNotification @ notifications.ts:228
notify @ notificationService.ts:253
Ob @ nativeExtensionService.ts:408
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [xabikos.JavaScriptSnippets]: Unknown language in `contributes.JavaScriptSnippets.language`. Provided value: vue
log.ts:437   ERR Time limit reached: Error: Time limit reached
    at o.i (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:11483)
    at o.h (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:11464)
    at a.value (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:11316)
    at o.y (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902)
    at o.fire (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119)
    at T.cancel (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:10243)
    at I.cancel (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:10653)
    at a.value (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:11055)
    at o.y (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902)
    at o.fire (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119)
    at T.cancel (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:10243)
    at I.cancel (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:10653)
    at vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:10816
log.ts:437   ERR [remote-connection][ExtensionHost][1478c…][initial][WebSocket(127.0.0.1:5017)] the handshake timed out. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR [remote-connection][attempt 5]  An error occurred in initial connection! It will be treated as a permanent error. Error:
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
log.ts:437   ERR Error received from starting extension host (kind: Remote)
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
console.ts:137 [Extension Host] vscode-custom-css is active!
console.ts:137 [Extension Host] Application directory e:\Microsoft VS Code\resources\app\out
console.ts:137 [Extension Host] Main HTML file e:\Microsoft VS Code\resources\app\out\vs\code\electron-sandbox\workbench\workbench.html
log.ts:437   ERR Error: Time limit reached
    at o.i (remoteAgentConnection.ts:148:20)
    at o.h (remoteAgentConnection.ts:144:28)
    at a.value (remoteAgentConnection.ts:126:86)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at a.value (remoteAgentConnection.ts:99:41)
    at o.y (event.ts:1127:13)
    at o.fire (event.ts:1158:9)
    at T.cancel (cancellation.ts:69:19)
    at I.cancel (cancellation.ts:124:16)
    at remoteAgentConnection.ts:89:26
console.ts:137 [Extension Host] [vscode-icons] v12.7.0 activated!
log.ts:437   ERR Time limit reached: Error: Time limit reached
    at o.i (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:11483)
    at o.h (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:11464)
    at a.value (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:11316)
    at o.y (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902)
    at o.fire (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119)
    at T.cancel (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:10243)
    at I.cancel (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:10653)
    at a.value (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:11055)
    at o.y (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:1902)
    at o.fire (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:2119)
    at T.cancel (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:10243)
    at I.cancel (vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:87:10653)
    at vscode-file://vscode-app/e:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:688:10816

我还安装了 docker 并连接到 WSL。早期的 docker 自动设置为默认发行版,这导致了一些安装错误,但更改默认发行版修复了该问题。然而这并没有解决vscode无法连接的问题。我也尝试过使用不同的发行版,例如 Ubuntu 和 Fedora,但没有成功。

visual-studio-code windows-subsystem-for-linux wsl-2 vscode-remote
1个回答
0
投票

问题可能会得到解决。

  1. 为 Windows 安装 VS code,而不是为 linux 安装 VS code(VS code 下载
  2. 安装删除开发扩展包
  3. 打开您的终端(最好是从 Microsoft Store 下载终端)
  4. 打开项目目录并输入
    code .
  5. 终端将自动安装并使用 WSL 打开 VS code 链接。

有关更多信息,请查看文档通过 WSL 开始使用 VS Code

© www.soinside.com 2019 - 2024. All rights reserved.