GithubHelp home page GithubHelp logo

Comments (7)

jbyuki avatar jbyuki commented on June 16, 2024

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:

@parse_debug_traces+=
local levels = 1
while levels <= max_levels or max_levels == -1 do
local info = debug.getinfo(2+levels+start_frame)
if not info then
break
end
@fill_stack_frame_with_info
table.insert(stack_frames, stack_frame)
frames[frame_id] = 2+levels+start_frame
frame_id = frame_id + 1
levels = levels + 1
end

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.

miversen33 avatar miversen33 commented on June 16, 2024

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.

jbyuki avatar jbyuki commented on June 16, 2024

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.

jbyuki avatar jbyuki commented on June 16, 2024

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.

miversen33 avatar miversen33 commented on June 16, 2024

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.

jbyuki avatar jbyuki commented on June 16, 2024

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.

miversen33 avatar miversen33 commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.