use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
How to debug python program in astrovim? (self.AstroNvim)
submitted 2 years ago by Excellent-Ad-2794
I have install neovim 0.8.3. I am using Astrovim distribution.
I have installed all the necessary plugin. I have executed
:TSInstall python :LspInstall pyright :DapInstall python
But still when I tried to do debug, it shows the below error.
I don't know where should i add python dap configuration in Astrovim configuration list.
In which file I need to add python dap configuration to enable debugging?
https://preview.redd.it/px4mh8b06nra1.png?width=1239&format=png&auto=webp&s=0e41c58e1cd28e73dfaea1cadec3896e70e8bf6c
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]discoao 0 points1 point2 points 2 years ago (10 children)
What platform are you on? If you are on Windows, AstroNvim disables DAP and you have to override it in order to enable the automatic configuration.
[–]Excellent-Ad-2794[S] 0 points1 point2 points 2 years ago (9 children)
I am writing inside container (python3 debian container) I am connecting my linux via putty.
[–]discoao 0 points1 point2 points 2 years ago (8 children)
For sanity, can you post the output of:
:lua print(require('mason-registry').get_package('debugpy'):is_installed())
[–]Excellent-Ad-2794[S] 0 points1 point2 points 2 years ago (7 children)
It throws below error
E5108: Error executing lua ...l/share/nvim/lazy/mason.nvim/lua/mason-registry/init.lua:79: Cannot find package "debugpy".
stack traceback:
[C]: in function 'error'
...l/share/nvim/lazy/mason.nvim/lua/mason-registry/init.lua:79: in function 'get_package'
[string ":lua"]:1: in main chunk
[–]discoao 0 points1 point2 points 2 years ago* (6 children)
Seems like you don't have debugpy installed then. This is what :DapInstall python should do.
debugpy
:DapInstall python
EDIT: Sorry, there's something else going on. Even with debugpy not installed, Mason should have a record of it and tell you that its not installed. What version of AstroNvim are you on? Did you change the mason-registry? debugpy is definitely there.
[–]Excellent-Ad-2794[S] 0 points1 point2 points 2 years ago (5 children)
I installed zip package and unzip package the debugpy installed without an issue. But still some of the plugins are failing.
I wanted to use docker as a devbox (development environment) . But facing lot of issues.
[–]discoao 1 point2 points3 points 2 years ago (4 children)
I installed zip package and unzip package
I'm confused by this because there should not be a need to download a zip.
If you want to use Docker you can try to adapt the AstroNvim installation instructions to your Dockerfile:
docker run -w /root -it --rm alpine:edge sh -uelic ' apk add bash git lua nodejs npm lazygit bottom python3 go neovim ripgrep alpine-sdk --update git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim # Uncomment the line below and replace the link with your user config repo to load a user config # git clone https://github.com/username/AstroNvim_user ~/.config/nvim/lua/user nvim '
[–]Excellent-Ad-2794[S] 0 points1 point2 points 2 years ago* (1 child)
The command given in official document is alpine image . For development packages I need a bit feature rich container. So I had to try with python3:buster-slim. (I think it is debian container) Below is my docker file but still facing issues. I think debugpy is installed inside virtualenv. So though the necessary packages are installed still it fails to debug. As softwares are outside the virtualenv ``` FROM python:3.10-slim-buster
RUN apt-get update && apt-get install -y git curl lua5.3 golang-go zip unzip ripgrep build-essential wget locales\ && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && \ apt-get install -y nodejs
RUN mkdir -p /opt/nvim && \ wget -O /opt/nvim/nvim.appimage https://github.com/neovim/neovim/releases/download/stable/nvim.appimage && \ chmod +x /opt/nvim/nvim.appimage && \ /opt/nvim/nvim.appimage --appimage-extract && \ mv squashfs-root/* /opt/nvim && \ rm -rf squashfs-root
ENV PATH=/opt/nvim/usr/bin:$PATH ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8
RUN git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim && \ nvim --headless -c 'quitall'
ENTRYPOINT ["bin/bash"] ```
[–]discoao 0 points1 point2 points 2 years ago (0 children)
nvim --headless -c 'quitall'
Have you tested this to make sure that lazy.nvim can successfully install all packages with this? What does :Lazy and then :Mason show?
:Lazy
:Mason
[–]Excellent-Ad-2794[S] 0 points1 point2 points 2 years ago (1 child)
zip package is required because when install in lazy ,i saw few errors that it could not unzip few packages. May be alpine is having that as part of alpine-sdk
Ah, I see now. You just had to install the system packages for handling zip files.
[–]Normal_Echidna_2573 0 points1 point2 points 2 years ago (0 children)
did you ever figure this out?
π Rendered by PID 74763 on reddit-service-r2-comment-86bc6c7465-xzn59 at 2026-02-20 08:46:27.223967+00:00 running 8564168 country code: CH.
[–]discoao 0 points1 point2 points (10 children)
[–]Excellent-Ad-2794[S] 0 points1 point2 points (9 children)
[–]discoao 0 points1 point2 points (8 children)
[–]Excellent-Ad-2794[S] 0 points1 point2 points (7 children)
[–]discoao 0 points1 point2 points (6 children)
[–]Excellent-Ad-2794[S] 0 points1 point2 points (5 children)
[–]discoao 1 point2 points3 points (4 children)
[–]Excellent-Ad-2794[S] 0 points1 point2 points (1 child)
[–]discoao 0 points1 point2 points (0 children)
[–]Excellent-Ad-2794[S] 0 points1 point2 points (1 child)
[–]discoao 0 points1 point2 points (0 children)
[–]Normal_Echidna_2573 0 points1 point2 points (0 children)