-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to debug with Debugpy #7592
Comments
You don't have to |
@dimbleby I think you're mixing this issue with the other. For this issue I'm not using For this issue, even in a Poetry shell, the issue is the same. If I install the application with Poetry, Flask debugger doesnt work for some reason (with Nvim). If I install the same application without using Poetry (in a common venv) it works To be 100% clear, in the Poetry shell the debugger is able to bootstrap, but setting breakpoints breaks the application for some reason. |
all you have given us here is a link to another issue, in which the configuration shows that you are calling
if you're now saying that's not what you're doing then I don't even |
@dimbleby as I've mentioned, the same thing happens if you open a shell instead of using |
do you mean This report is too involved and too confused: if you can reduce it to something that reproduces without having to install neovim and dap and flask then you'll have a better chance of someone taking an interest in it. |
@dimbleby you can use the same example from the original issue (on the last comment from the nvim-dap-python author) I can create a github repo if you want, but essentially you just need to launch any simple Python application. Unfortunately I don't see any possible alternative of exploring this issue without having to install |
you've linked to a comment which says that "it works for me.". Plainly that is not a way to reproduce your problem. I'm gonna duck out, this is going nowhere. Maybe I'm being grumpy but I think this is good advice: you'll have a better chance of getting help from people if you make it as easy as possible for them. Links to complicated issues, with not very much information, and contradictory comments... are not that. |
@dimbleby if you really wants to help and understand the problem, take some time to read the original issue. It isn't a "it works for me" issue. It contains a minimal reproduction. You just need to duplicate that code on your machine and run it, with and without using Poetry As I've mentioned, if you want I can create a repository to simplify, but it is just a single file, I don't see any point of creating a repo for that |
I found a really nice way of doing this after banging my head on my desk over it. .vscode/launch.json{
"version": "0.2.0",
"configurations": [
{
"name": "Debug: start",
"type": "debugpy",
"request": "launch",
"module": "poetry",
"args": [
"run",
"start"
],
"justMyCode": false
}
]
} poetry.toml[virtualenvs]
in-project = true And then the final touch is to run poetry add --group dev poetry which bootstraps poetry and enables its use with |
Do the instructions in #9708 (comment) fix this issue? If not, please provide clear instructions on how to reproduce, with sample code, configs, etc. |
Poetry version: 1.4.0
Python version: 3.10
OS version and name: Arch Linux
I am on the latest stable Poetry version, installed using a recommended method.
I have searched the issues of this repo and believe that this is not a duplicate.
I have consulted the FAQ and blog for any relevant entries or release notes.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.Issue
Following up on this issue, for some reason nvim-dap is not being able to attach a debugger if I'm running an application using Poetry
If I run using Python directly it works, but using Poetry it automatically closes. If I run from within a Poetry shell, it bootstraps the debugger, but whenever I set breakpoints debugpy throws an error
You can see the details on the original issue.
To replicate the issue you just need to do the following:
vscode/launch.json
:foo.py
:After this, run in your IDE, attach a debugger to it and test. You'll see that it works.
Now, do the same, but on the setup step do the setup using Poetry. After this, tried running the debugger with the Poetry setup. It would either not work (if you try using it with
poetry run
) or it will not be able to set any breakpoints (if you try usingpoetry shell
)The text was updated successfully, but these errors were encountered: