clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
629 stars 106 forks source link

Clang Language Server client: couldn't create connection to server. #535

Open daidaiJ opened 1 year ago

daidaiJ commented 1 year ago

Logs [Error - 21:02:43] Clang Language Server client: couldn't create connection to server. Message: Pending response rejected since connection got disposed Code: -32097 [Error - 21:02:43] Restarting server failed Message: Pending response rejected since connection got disposed Code: -32097 [Info - 21:02:43] Connection to server got closed. Server will restart. [Error - 21:02:43] Server initialization failed. Message: Pending response rejected since connection got disposed Code: -32097 [Error - 21:02:43] Clang Language Server client: couldn't create connection to server. Message: Pending response rejected since connection got disposed Code: -32097 [Error - 21:02:43] Restarting server failed Message: Pending response rejected since connection got disposed Code: -32097 [Error - 21:02:43] The Clang Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

System information clangd version 16.0.2 (https://github.com/llvm/llvm-project 18ddebe1a1a9bde349441631365f0472e9693520) Features: linux+grpc Platform: x86_64-unknown-linux-gnu

dev-tool console output: [Extension Host] Clang Language Server is now active! (at console. (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:112570)) notificationsAlerts.ts:42 Pending response rejected since connection got disposed c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Clang Language Server client: couldn't create connection to server. c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Pending response rejected since connection got disposed c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Clang Language Server client: couldn't create connection to server. c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Pending response rejected since connection got disposed c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Clang Language Server client: couldn't create connection to server. c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Restarting server failed c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Pending response rejected since connection got disposed c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Clang Language Server client: couldn't create connection to server. c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Restarting server failed c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 The Clang Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information. c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Pending response rejected since connection got disposed c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Clang Language Server client: couldn't create connection to server. c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 notificationsAlerts.ts:42 Restarting server failed c @ notificationsAlerts.ts:42 (anonymous) @ notificationsAlerts.ts:28 z @ event.ts:1138 A @ event.ts:1149 fire @ event.ts:1173 addNotification @ notifications.ts:204 notify @ notificationService.ts:175 (anonymous) @ mainThreadMessageService.ts:77 d @ mainThreadMessageService.ts:42 $showMessage @ mainThreadMessageService.ts:36 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: Client is not running and can't be stopped. It's current state is: startFailed (at console. (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:112570)) $ @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 console.ts:137 [Extension Host] stack trace: Error: Client is not running and can't be stopped. It's current state is: startFailed at ff.shutdown (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:39:8662) at ff.stop (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:39:8241) at ff.stop (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:39:51221) at mp.dispose (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:240:11352) at /home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:240:11766 at Generator.next () at /home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:1:1302 at new Promise () at Ue (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:1:1122) at /home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:240:11733 at n.h (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:84283) at n.$executeContributedCommand (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:85143) at i.S (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:10827) at i.Q (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:10593) at i.M (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:9683) at i.L (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:8762) at s.value (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:7565) at c.z (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:1902) at c.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:2119) at m.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:96:14010) at s.value (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:7902) at c.z (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:1902) at c.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:2119) at m.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:96:14010) at MessagePortMain. (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:6182) at MessagePortMain.emit (node:events:513:28) at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:367) (at console. (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:112570)) $ @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 mainThreadExtensionService.ts:81 [llvm-vs-code-extensions.vscode-clangd]Client is not running and can't be stopped. It's current state is: startFailed $onExtensionRuntimeError @ mainThreadExtensionService.ts:81 S @ rpcProtocol.ts:456 Q @ rpcProtocol.ts:441 M @ rpcProtocol.ts:371 L @ rpcProtocol.ts:297 (anonymous) @ rpcProtocol.ts:161 z @ event.ts:1138 fire @ event.ts:1169 fire @ ipc.net.ts:650 Y.onmessage @ localProcessExtensionHost.ts:581 mainThreadExtensionService.ts:82 Error: Client is not running and can't be stopped. It's current state is: startFailed at ff.shutdown (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:39:8662) at ff.stop (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:39:8241) at ff.stop (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:39:51221) at mp.dispose (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:240:11352) at /home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:240:11766 at Generator.next () at /home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:1:1302 at new Promise () at Ue (/home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:1:1122) at /home/user/.vscode-insiders/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.24/out/bundle.js:240:11733 at n.h (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:84283) at n.$executeContributedCommand (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:85143) at i.S (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:10827) at i.Q (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:10593) at i.M (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:9683) at i.L (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:8762) at s.value (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:134:7565) at c.z (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:1902) at c.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:2119) at m.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:96:14010) at s.value (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:7902) at c.z (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:1902) at c.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:2119) at m.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:96:14010) at MessagePortMain. (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:6182) at MessagePortMain.emit (node:events:513:28) at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:367)

daidaiJ commented 1 year ago

In brief, the Clangd language server has failed multiple restarts.

2694048168 commented 1 year ago

I seem to have encountered the same problem. No matter how I restart VSCode or update the clangd server, I can't solve the problem.

daidaiJ commented 1 year ago

I seem to have encountered the same problem. No matter how I restart VSCode or update the clangd server, I can't solve the problem.

ahhhh,I don't know how to debug the vscode extension and feel powerless(´இ皿இ`)

HighCommander4 commented 1 year ago

Are you able to successfully start the clangd server executable from the command line?

daidaiJ commented 1 year ago

Are you able to successfully start the clangd server executable from the command line?

clangd?The command line like clangd --help which I can successfully execute in the terminal

HighCommander4 commented 1 year ago

Are you able to successfully start the clangd server executable from the command line?

clangd?The command line like clangd --help which I can successfully execute in the terminal

If you start it without --help, do you get to the line that says "Starting LSP over stdin/stdout"? (Then you can Ctrl+C to interrupt it.)

daidaiJ commented 1 year ago

Are you able to successfully start the clangd server executable from the command line?

clangd?The command line like clangd --help which I can successfully execute in the terminal

If you start it without --help, do you get to the line that says "Starting LSP over stdin/stdout"? (Then you can Ctrl+C to interrupt it.)

I get something like : I[08:21:12.297] clangd version 16.0.2 (https://github.com/llvm/llvm-project 18ddebe1a1a9bde349441631365f0472e9693520) I[08:21:12.297] Features: linux+grpc I[08:21:12.297] PID: 11589 I[08:21:12.297] Working directory: xxx I[08:21:12.297] argv[0]: clangd I[08:21:12.299] Starting LSP over stdin/stdout Then Ctrl + c interruot and clangd: Restart Language Server;

This method did not take effect, and the log output of clangd did not change.

HighCommander4 commented 1 year ago

Ok, that looks fine. I was just trying to rule out issues with the clangd executable failing to start altogether.

I don't have a theory about what might be causing the "couldn't create connection to server" error in the client.

Hopefully someone else can chime in with a suggestion.

2694048168 commented 11 months ago

After I deleted all the configuration data files of VSCode and reinstalled the VSCode and clangd extension, it seemed to work normally again. ^^ ^^

amal-khailtash commented 10 months ago

I am having trouble getting clangd starting under vscode. The latest working version I have is:

$ clangd --version
clangd version 15.0.0
Features: linux
Platform: x86_64-unknown-linux-gnu

Under vscode clangd output tab, I see:

Clang Language Server client: couldn't create connection to server.
Launching server using command clangd failed. Error: spawn clangd ENOENT
yang625 commented 10 months ago

I am having trouble getting clangd starting under vscode. The latest working version I have is:

$ clangd --version
clangd version 15.0.0
Features: linux
Platform: x86_64-unknown-linux-gnu

Under vscode clangd output tab, I see:

Clang Language Server client: couldn't create connection to server.
Launching server using command clangd failed. Error: spawn clangd ENOENT

I have this problem, too. Have you solved it?

Leager-zju commented 9 months ago

I am having trouble getting clangd starting under vscode. The latest working version I have is:

$ clangd --version
clangd version 15.0.0
Features: linux
Platform: x86_64-unknown-linux-gnu

Under vscode clangd output tab, I see:

Clang Language Server client: couldn't create connection to server.
Launching server using command clangd failed. Error: spawn clangd ENOENT

same problem here QAQ.

amal-khailtash commented 9 months ago

I am having trouble getting clangd starting under vscode. The latest working version I have is:

$ clangd --version
clangd version 15.0.0
Features: linux
Platform: x86_64-unknown-linux-gnu

Under vscode clangd output tab, I see:

Clang Language Server client: couldn't create connection to server.
Launching server using command clangd failed. Error: spawn clangd ENOENT

I have this problem, too. Have you solved it?

No, no resolution yet!

fmartinsons commented 8 months ago

Same problem here :'( For information, comments in #454 have helped me, my workspaces contained some invalid path, after cleaned these up, clangd successfully starts again. No clue about this side effect though

HappyPotato24 commented 4 months ago

Verify Clangd Installation: Make sure 'clangd' is properly installed. You can try reinstalling it. If you're using a package manager, you can use one of the following commands: sudo chmod +x /path/to/clangd Replace '/path/to/clangd' with the actual path to the clangd executable.

I am having trouble getting clangd starting under vscode. The latest working version I have is:

$ clangd --version
clangd version 15.0.0
Features: linux
Platform: x86_64-unknown-linux-gnu

Under vscode clangd output tab, I see:

Clang Language Server client: couldn't create connection to server.
Launching server using command clangd failed. Error: spawn clangd ENOENT

same problem here QAQ.