Closed tpotie closed 2 years ago
Hello there,
I might have misunderstood your explanation so I'm just checking to make sure.
However, I closed neovim and now when I reopen it, I keep getting the complete output of my test file on start-up.
Are you running neovim with just nvim
or are you running the file at the same time? Why would you get the file output at startup?
I have tried uninstalling this plugin but this still occurs when opening neovim (I tried running it in headless, and it still prints the file test output on startup without any errors)
Same question, are you running the file immediatly at startup?
Usually, the "server" instance is opened and then lua require"osv".launch
is called and only then the file is executed, for example with :luafile myscript.lua
.
Needs more clarifcation to see what the issue is.
Hi! Thanks for the response.
I ended up trying a few things locally and thanks to your questions, it was able to lead me down a path of getting a few answers as to what I was running up against.
Are you running neovim with just nvim or are you running the file at the same time? Why would you get the file output at startup?
This was my mistake. I had included my test file into the initial config of nvim (I had added code before attempting to run and get the debugger working and I had left it in...)
Add this to my misunderstanding of how to run the debugger, it compounded the issue (as when the script was loaded on start it was not allowing me to invoke require"osv".run_this()
on the file either)
I came across this screencast of yours which helped clear it up: https://github.com/jbyuki/one-small-step-for-vimkind/issues/7#issuecomment-925273710
My workflow with running debuggers in general, is closer to the alternative steps:
- Open a lua file
- Place breakpoint
- Invoke require"osv".run_this()
And then letting the debugger itself take care of running the code (or binary in other setups) without needing to do it manually.
Would there be a simple way to get "dap".continue()
to run "osv.run_this()
on lua files instead? (With the config?) So I can manage to keep the same keymaps and logic between the DAP debuggers I use
(I'm slowly diving into the world of lua plugin development as it is interesting, so I'm trying to figure out the dev environment)
I don't clearly understand the question now, sorry for not coming back to it sooner. If you have more questions, please ask them again here.
Hello,
I was able to set it up using the provided default config:
I started debugging a lua file (adding breakpoints) and I started the server (with
require"osv".launch()
) and I was able to go through and debug + get print outputs from the file.However, I closed neovim and now when I reopen it, I keep getting the complete output of my test file on start-up.
I am not able to relaunch the server (
require"osv".launch()
orrequire"osv".run_this()
) as each time it reportsNeovim is waiting for input at startup. Aborting.
.I have tried uninstalling this plugin but this still occurs when opening neovim (I tried running it in headless, and it still prints the file test output on startup without any errors)
How would I be able to "unblock" this situation and get back to using the plugin?
(Just to add, it is possible that I ran
require"osv".launch()
from the same nvim instance that I had the debugged file open in - if that is possible? At this stage I don't remember the initial launch run)Thanks