Git Product home page Git Product logo

Comments (16)

simrat39 avatar simrat39 commented on May 20, 2024 1

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

from rust-tools.nvim.

simrat39 avatar simrat39 commented on May 20, 2024

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

from rust-tools.nvim.

badrbouslikhin avatar badrbouslikhin commented on May 20, 2024

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

from rust-tools.nvim.

ca-mantis-shrimp avatar ca-mantis-shrimp commented on May 20, 2024

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?

from rust-tools.nvim.

simrat39 avatar simrat39 commented on May 20, 2024

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

from rust-tools.nvim.

simrat39 avatar simrat39 commented on May 20, 2024

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?

from rust-tools.nvim.

ca-mantis-shrimp avatar ca-mantis-shrimp commented on May 20, 2024

Just to note,

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

from rust-tools.nvim.

simrat39 avatar simrat39 commented on May 20, 2024

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

from rust-tools.nvim.

wonbyte avatar wonbyte commented on May 20, 2024

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!

from rust-tools.nvim.

wonbyte avatar wonbyte commented on May 20, 2024

@simrat39 Thanks for the configuration option :)

from rust-tools.nvim.

simrat39 avatar simrat39 commented on May 20, 2024

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

from rust-tools.nvim.

badrbouslikhin avatar badrbouslikhin commented on May 20, 2024

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)

from rust-tools.nvim.

simrat39 avatar simrat39 commented on May 20, 2024

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!

from rust-tools.nvim.

badrbouslikhin avatar badrbouslikhin commented on May 20, 2024

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

from rust-tools.nvim.

simrat39 avatar simrat39 commented on May 20, 2024

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?

from rust-tools.nvim.

simrat39 avatar simrat39 commented on May 20, 2024

Should be fixed now, idk why gihub closes the issue

from rust-tools.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.