Open Chamal1120 opened 5 months ago
If I use the python from homebrew, I get the same message in the same condition. If I use the python from anaconda, it will not show the message. My system is macOS 14.5(M1). I use a plugin called venv-selector to change environment.
If I use the python from homebrew, I get the same message in the same condition. If I use the python from anaconda, it will not show the message. My system is macOS 14.5(M1). I use a plugin called venv-selector to change environment.
@BLACKSWORD0 can you tell me more about your conda setup?
If I use the python from homebrew, I get the same message in the same condition. If I use the python from anaconda, it will not show the message. My system is macOS 14.5(M1). I use a plugin called venv-selector to change environment.
@BLACKSWORD0 can you tell me more about your conda setup?
- Can I use it alongside my macos default python + hombrew python?
- did you installed conda from brew? (if so what is the exact brew command?)
- How do I set the path for the debugpy in my lua plugin with conda?
I use a plugin called venv-selector to change environment. You can view its doc for more details. My config about them is following (My full config of python bases on astronvim, so I just show this part.):
{
"linux-cultist/venv-selector.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"mfussenegger/nvim-dap-python",
"nvim-lua/plenary.nvim",
},
opts = {
anaconda_base_path = "/opt/homebrew/anaconda3",
anaconda_envs_path = "/opt/homebrew/anaconda3/envs",
stay_on_this_version = true,
dap_enabled = true,
settings = {
options = {
notify_user_on_venv_activation = true,
},
},
},
cmd = { "VenvSelect" },
},
{
"mfussenegger/nvim-dap-python",
dependencies = "mfussenegger/nvim-dap",
ft = "python",
config = function(_, opts)
require("dap-python").setup("python", opts)
end,
},
But I don't use debugpy in mason, I just install debugpy in ~/.virtualenvs. "venv-selector" will find it automatically. If you want, you can change the config of "venv-selector" to find debugpy in mason.
The following is an example to show "venv-selector":
https://github.com/mfussenegger/nvim-dap-python/assets/56479341/825ea27a-f090-44bf-b28c-57b56b7de48a
@BLACKSWORD0 Thanks will look into this and give you an update.
I have the exact same issue, i use python 3.12.4.
This is my setup for nvim dap.
return {
{
"mfussenegger/nvim-dap",
-- stylua: ignore
keys = {
{ "<leader>s", function() require("dap").continue() end, desc = "Debug: Continue" },
{ "<up>", function() require("dap").step_over() end, desc = "Debug: Step over" },
{ "<down>", function() require("dap").step_into() end, desc = "Debug: Step into" },
{ "<right>", function() require("dap").step_out() end, desc = "Debug: Step out" },
{ "<leader>b", function() require("dap").toggle_breakpoint() end, desc = "Debug: Toggle breakpoint" },
},
},
{
"rcarriga/nvim-dap-ui",
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
config = function()
local dap = require("dap")
local dapui = require("dapui")
dapui.setup()
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
end,
},
{
"mfussenegger/nvim-dap-python",
ft = "python",
dependencies = { "mfussenegger/nvim-dap", "rcarriga/nvim-dap-ui" },
config = function()
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
require("dap-python").setup(path)
end,
},
}
A temporary solution would be to run this in the terminal:
defaults write com.apple.CrashReporter DialogType none
To enable it again:
defaults write com.apple.CrashReporter DialogType prompt
You must restart for the changes to take effect.
I have an issue where macOS gives this error message "Python quit unexpectedly" on every time when I try to terminate, exit or reach the end of the program that I'm debugging. Apart from that the debugger works as expected.
OS - macOS Monterey 12.7.5 (intel macbook) Package manager - homebrew (python also installed with brew) neovim version - v0.10.0 (installed with brew) Plugin manager - lazy.nvim **Debugpy installed with mason tho. (actually I don't how it works. I just copy pasted some codes.)
below is my lua code related to debugging plugins located inside
parent folder > lua > plugins
p.s. - I'm a total beginner to neovim and lua and I might have made a lot of mistakes. I hope someone would help me out to correct my code.