Comments (7)
Thanks :) First I would like to mention that this is highly experimental and the implementation is far from pretty (lots of workarounds to make this work) so don't expect to run smoothly 100% of the time. It's more of a helpful tool to track down where the usual workflow is 1. place a breakpoint 2. inspect a runtime value 3. done. But if the basics are not even working, that's certainly an issue we can try to fix.
I never heard/experienced breakpoints stopping in osv itself but it's might be possible with an incorrect stackframe, in other words, the returned stackframe is going too deep into the osv code itself. I have never experienced it so it might be something configuration specific. I could also imagine that if you're not using the same luajit implementation, this could happen.
If that's the case, I don't think a "justMyCode" option would help. My theory is that osv is stopping at the right point in your project, but the stackframe is messed up and nvim-dap jumps you to the osv code. I remember that getting the correct level on the stackframe was me just trying out some numbers and finding something which seem acceptable but I never thought about it too much, nows the time maybe.. If you're interested the stackframe is filled here:
one-small-step-for-vimkind/src/handlers/stack_trace.lua.t
Lines 26 to 40 in ccd671f
As you can see I added a (+2) for no real good reason. Might be a (+3) for your case. A deeper investigation into this might be good at some point.
Can you provide a log of a debugging session?
You could try to launch osv with logging. See :help osv on how to. The resulting log is located in nvim-data/osv.log (use echo stdpath('data') to locate nvim-data).
from one-small-step-for-vimkind.
Its hard to recreate as it is seemingly random. I have attached the requested log from a session in which the issue happened. It was the last thing that happened (in terms of OSV), but looking at the log, I can't make heads or tails of it so I don't know how to remove anything prior to that.
osv.log
from one-small-step-for-vimkind.
This is not enough to see where it's coming from. Can you try again with the nvim-dap logger and recreate the bug if it's possible? It is documented in the dap.txt documentation. It's missing some informations in the osv log because it's running multiple instances of neovim and the logger is not unified. But the nvim-dap logger gives the same thing actually and might be able to help us.
from one-small-step-for-vimkind.
I have now implemented proper logging into osv as well, so you can try to log again with that... or with nvim-dap. However you like :)
from one-small-step-for-vimkind.
Sure no problem! I am noticing the issue tends to occur on a server reconnect. IE, I successful start a session, and then kill the connected neovim session. I restart it, restart the osv server and then reconnect my source code session to the osv server and it seems to jump into osv first (and the stack generally seems confused). I have attached the requested log, it is from a full successful usage followed by a session that jumped into the osv source instead of mine.
osv.log
from one-small-step-for-vimkind.
I haven't found the issue yet, but one thing that seem strange is that everything in the log is duplicated. I don't think that's normal. Like two clients are connected to the osv server, which it does not support by design. I'll investigate a bit more on it. Too bad I cannot reproduce the issue here but at least this log should help a bit.
from one-small-step-for-vimkind.
If you would like, you can reach out to me on discord miversen33#0131
and I would be more than happy to live walk through reproducing it for you/let you live troubleshoot it. If I get some time I might get a docker container thrown together to help demo the issue.
I want to reiterate, I really like this plugins, but this issue makes it a huge hassle for me to use. Thus if I can help eliminate said issue (its possible I am just doing something wrong, users are dumb afterall), it would greatly help out my work through my plugin development :)
from one-small-step-for-vimkind.
Related Issues (20)
- Debug adapter disconnected HOT 4
- Is port number correct? HOT 1
- Any instruction on how to get the debugger going using LunarVim? HOT 12
- Can dap continue launch the lua file? HOT 1
- Missing line field in StackFrame, causes errors in Vimspector HOT 1
- Print value of global variable? HOT 2
- How to debug key mapping or auto commands HOT 5
- How to debug Lua scripts in Unreal Engine? HOT 1
- Cannot launch with another rpc client HOT 4
- No response or event received HOT 3
- Get error when restart session HOT 1
- Evaluation only displays an empty rectangle HOT 6
- Plugin does not support wrapped `nvim` executable? HOT 6
- nvim gets spawned recursively? HOT 4
- Repl evaluate doesn't have access to function upvalues HOT 2
- Frames for pre-compiled sources report wrong path/line/column HOT 4
- Debugger couldn't connect to 127.0.0.1:8086: ECONNREFUSED while debugging lazy plugins HOT 2
- Stdout (print, io.write) doesn't seem to work HOT 3
- Launching osv via cli args HOT 2
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 one-small-step-for-vimkind.