Comments (4)
Could be related to multiprocessing, see mfussenegger/nvim-dap#858 (comment)
You could set export DEBUGPY_LOG_DIR=/tmp/debugpy/
in the terminal where you start neovim/debugpy to get debugpy logs for more insights.
from nvim-dap-python.
@mfussenegger thanks for your quick response!
So, I did as you suggested and got the following log files:
debugpy.adapter-16432.log
debugpy.launcher-16440.log
debugpy.pydevd.16445.log
debugpy.server-16445.log
I'm not sure what those logs mean 🤔
from nvim-dap-python.
I tried a more minimal version and it works for me:
Setup:
python -m venv venv
venv/bin/python -m pip install Flask
Create vscode/launch.json
:
{
"version": "0.2.0",
"configurations": [
{
"type": "python",
"request": "launch",
"name": "Flask",
"module": "flask",
"args": ["--app", "foo", "run"],
"console": "integratedTerminal"
}
]
}
Create foo.py
:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "<p>Hello World</p>"
Maybe something odd going on with your use of poetry. I don't use it myself so I can't help you with that.
Maybe check the debugpy repository for more info on that.
from nvim-dap-python.
@mfussenegger I was able to at least launch the debugger by running in a shell that has the venv activated (using poetry shell
). But, whenever I try setting breakpoints I get a Server disconnected
error, this is the log:
D+00004.256: Client[1] --> {
"seq": 5,
"type": "request",
"command": "setBreakpoints",
"arguments": {
"lines": [
8
],
"source": {
"path": "/home/delucca/src/delucca/sandbox/poetry-debug-issue/poetry_debug_issue/__init__.py",
"name": "__init__.py"
},
"sourceModified": false,
"breakpoints": [
{
"line": 8
}
]
}
}
D+00004.257: /handling #5 request "setBreakpoints" from Client[1]/
Client[1] <-- {
"seq": 11,
"type": "response",
"request_seq": 5,
"success": false,
"command": "setBreakpoints",
"message": "Server[1] disconnected unexpectedly"
}
E+00004.266: /handling #5 request "setBreakpoints" from Client[1]/
Handler 'Client.request' (file '/home/delucca/.python-venvs/lib/python3.10/site-packages/debugpy/adapter/components.py', line 134)
couldn't handle #5 request "setBreakpoints" from Client[1]:
Server[1] disconnected unexpectedly
Any ideas of what can I do?
I tried opening the issue on Poetry's repo, but they aren't very helpful.
from nvim-dap-python.
Related Issues (20)
- crash on input()
- unintuitive configuration on Windows HOT 1
- debugging a flask application crashes before starting HOT 1
- Provide more configuration examples HOT 1
- Windows venv detection HOT 3
- Custom visualization of dataframes HOT 2
- how to debug with arguments?
- Debugpy - Windows HOT 4
- ModuleImportError when running from Pyenv HOT 6
- [Feature Request] `test_file`, `test_dir` & `test_all` HOT 2
- Help needed for compatibility with nvim-lua/kickstart HOT 1
- `os.fork` indefinitely waiting HOT 1
- Django and multiprocess HOT 8
- regression on detection of python bin HOT 1
- Debugging pytest test method fails on dap.continue() but works with dep.test_method() HOT 3
- type python deprecated in favor of debugpy HOT 2
- DAP `test_method` not uses `VIRTUAL_ENV` path HOT 2
- python not found in virtual environment HOT 4
- how to debug main method using pytest HOT 2
- Changing quotes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-dap-python.