Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

lldb-vscode not found - despite lldb being installed #54

Closed
badrbouslikhin opened this issue Aug 24, 2021 · 16 comments
Closed

lldb-vscode not found - despite lldb being installed #54

badrbouslikhin opened this issue Aug 24, 2021 · 16 comments

Comments

@badrbouslikhin
Copy link

badrbouslikhin commented Aug 24, 2021

Hello,

I cannot use RustDebuggables because lldb-vscode not found. Please install lldb.
I am on macOS 11.5.1 and lldb is installed through xcode with xcode-select --install.

What am I missing?

Thanks!

@simrat39
Copy link
Owner

Hello,

I cannot use RustDebuggables because lldb-vscode not found. Please install lldb.
I am on macOS 11.5.1 and lldb is installed through xcode with xcode-select --install.

What am I missing?

Thanks!

You just need lldb-vscode in your path, i'm not too familiar with mac os but you might want to look into vscode-lldb installation instructions for mac os

@badrbouslikhin
Copy link
Author

Thanks! It's added. The error changed to and is now Error on launch: process launch failed: unable to locate debugserver. Is there another dependency that needs to be installed and added to my path?

Screenshot 2021-08-30 at 10 14 46

Screenshot 2021-08-30 at 10 15 09

@ca-mantis-shrimp
Copy link

agreed,

I'm able to successfully run lldb-vscode from the CLI by using lldb-vscode-11 pictured below:

image

but i'm still getting the above error when I try to run RustDebuggables?

@simrat39
Copy link
Owner

simrat39 commented Sep 7, 2021

Honestly, I can't really help here because I don't have a mac device. Would it be possible for you guys to setup https://github.com/mfussenegger/nvim-dap and then help me with the steps so I can put it in the plugin? rust-tools uses nvim-dap in the background so if you get dap working externally then the plugin will also work fine

@simrat39
Copy link
Owner

simrat39 commented Sep 7, 2021

Also this might be a shot in the dark, but could you try to replace https://github.com/simrat39/rust-tools.nvim/blob/master/lua/rust-tools/dap.lua#L7 with lldb-server?

@ca-mantis-shrimp
Copy link

Just to note,

I'm on WSL for Windows, not Mac, idk if that says anything.

@simrat39
Copy link
Owner

simrat39 commented Sep 7, 2021

Just to note,

I'm on WSL for Windows, not Mac, idk if that says anything.

rust-tools looks for lldb-vscode in your path, but you seem to have lldb-vscode-11 so I think you should try changing the binary name here https://github.com/simrat39/rust-tools.nvim/blob/master/lua/rust-tools/dap.lua#L7 and if it works then we can add a config to change the binary name

@wonbyte
Copy link

wonbyte commented Sep 15, 2021

Just to note,
I'm on WSL for Windows, not Mac, idk if that says anything.

rust-tools looks for lldb-vscode in your path, but you seem to have lldb-vscode-11 so I think you should try changing the binary name here https://github.com/simrat39/rust-tools.nvim/blob/master/lua/rust-tools/dap.lua#L7 and if it works then we can add a config to change the binary name

I was looking at the binary vscode extension CodeLLDB pulls down and it seems to name it ‘lldb’. Having a config to change the name would be great!

@wonbyte
Copy link

wonbyte commented Sep 22, 2021

@simrat39 Thanks for the configuration option :)

@simrat39
Copy link
Owner

Does this work now? Let me know and I'll close the issue

@simrat39
Copy link
Owner

Ok so i'll be closing this, here's the fix for mac os if anyone is interested:

Download the CodeLLDB vscode extension
Get the lldb-server binary from there
Change the adapter settings of rust-tools to point to that binary

@badrbouslikhin
Copy link
Author

Thanks for the update!
I still have trouble using the plugin.
Here's my config:

-- rust-tools configuration
local opts = {
    dap = {
        adapter = {
            type = 'executable',
            command = 'lldb-vscode',
            name = "rt_lldb"
        }
    }
}
require('rust-tools').setup(opts)

This leads to:
Error on launch: process launch failed: unable to locate debugserver

When changing command to lldb-server:

-- rust-tools configuration
local opts = {
    dap = {
        adapter = {
            type = 'executable',
            command = 'lldb-server',
            name = "rt_lldb"
        }
    }
}
require('rust-tools').setup(opts)

I get:
Debug adapter didn't respond. Either the adapter is slow (then wait and ignore this) or there is a problem with your adapter or rt_lldb configuration. Check the logs for errors (:help dap.set_log_level)

@simrat39
Copy link
Owner

simrat39 commented Oct 1, 2021

Thanks for the update! I still have trouble using the plugin. Here's my config:

-- rust-tools configuration
local opts = {
    dap = {
        adapter = {
            type = 'executable',
            command = 'lldb-vscode',
            name = "rt_lldb"
        }
    }
}
require('rust-tools').setup(opts)

This leads to: Error on launch: process launch failed: unable to locate debugserver

When changing command to lldb-server:

-- rust-tools configuration
local opts = {
    dap = {
        adapter = {
            type = 'executable',
            command = 'lldb-server',
            name = "rt_lldb"
        }
    }
}
require('rust-tools').setup(opts)

I get: Debug adapter didn't respond. Either the adapter is slow (then wait and ignore this) or there is a problem with your adapter or rt_lldb configuration. Check the logs for errors (:help dap.set_log_level)

I'm sorry, i gave you the wrong instructions.
Try this: https://github.com/simrat39/rust-tools.nvim#a-better-debugging-experience and let us know!

@simrat39 simrat39 reopened this Oct 1, 2021
@badrbouslikhin
Copy link
Author

Thanks for the doc. update @simrat39.
I still have an issue:
Error executing vim.schedule lua callback: /Users/badr/.config/nvim/plugged/nvim-dap/lua/dap.lua:658: Adapter used with attach must have a port property
Also on my install, there's no .so:

vadimcn.vscode-lldb-1.6.7/lldb/lib 
❯ l
.rwxr-xr-x badr staff  71 MB Sun Oct  3 12:50:07 2021 - liblldb.dylib
.rwxr-xr-x badr staff 9.7 MB Sun Oct  3 12:50:07 2021 - libpython39.dylib
drwxr-xr-x badr staff 128 B  Sun Oct  3 12:50:07 2021 - lldb-python
drwxr-xr-x badr staff 6.2 KB Sun Oct  3 12:50:07 2021 - python3.9

@simrat39
Copy link
Owner

simrat39 commented Oct 3, 2021

Thanks for the doc. update @simrat39. I still have an issue: Error executing vim.schedule lua callback: /Users/badr/.config/nvim/plugged/nvim-dap/lua/dap.lua:658: Adapter used with attach must have a port property Also on my install, there's no .so:

vadimcn.vscode-lldb-1.6.7/lldb/lib 
❯ l
.rwxr-xr-x badr staff  71 MB Sun Oct  3 12:50:07 2021 - liblldb.dylib
.rwxr-xr-x badr staff 9.7 MB Sun Oct  3 12:50:07 2021 - libpython39.dylib
drwxr-xr-x badr staff 128 B  Sun Oct  3 12:50:07 2021 - lldb-python
drwxr-xr-x badr staff 6.2 KB Sun Oct  3 12:50:07 2021 - python3.9

The .dylib should also be fine. Looks like the port isnt being set, this is probably because your codelldb adapter is a bit slow to startup. I can fix that issue. But could you please run the codelldb binary from the command line and show what it outputs?

@simrat39
Copy link
Owner

simrat39 commented Oct 5, 2021

Should be fixed now, idk why gihub closes the issue

@simrat39 simrat39 reopened this Oct 5, 2021
@simrat39 simrat39 closed this as completed Dec 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants