-
Notifications
You must be signed in to change notification settings - Fork 1
Discussion of a few modifications #5
Comments
Hello again! I'm just going to address your points one by one. Using default clients for variables/stacktrace - Don't submit a pull request for this. This can be handled without any changes to
More information about modifying Stacktrace syntax and opening files - If you want to submit a pull request implementing this, absolutely - go for it. That sounds legit awesome. Don't show "+" arrow on empty arrays - I don't think this is possible, to be completely honest, and here's why. Every Long story short, if the adapter is returning a Feature request - It is indeed possible to implement this, but it is difficult due to how the DAP is designed. Basically, when sending breakpoints to a debug adapter, you can't just set or remove a single breakpoint - you have to update all the breakpoints in any given file in a single message. This means that, whenever a breakpoint is set or removed at runtime, we would need to remember what breakpoints are associated with that file, and set or remove the breakpoint in that group of breakpoints, then send those breakpoints to the adapter all at once. It's frankly extremely over-engineered, but it's what we've got to work with. In short, it's very possible to do this, but it's far from trivial, and the "you can't set breakpoints at runtime" restriction was just me kicking the can further down the road. I do plan to tackle this at some point, though. |
Thanks for taking your time to read my long message, hah. All sounds good. I might take a look at the breakpoint issue now that you have explained it, just out of curiosity to see if I can help out. Regarding the default client -- I fully understand how it's currently setup, and have read the docs. I realize now that what I describe in my approach is not best. I am not suggesting to change the feature, just the default behavior. I highly recommend DAP should use the That being said, what I propose is changing the The point here is to use default clients, as many other features/plugins do -- and allow a user to customize if they want something non-standard. I hope this makes sense, don't think I am suggesting anything but following the default approach to using the tools/docs clients where possible. |
I hear you regarding the default clients. I'm by no means married to the idea of custom clients for My main issue with this is that we shouldn't assume these clients exist if we do change to using docsclient and toolsclient (another question - which would be which?). We don't want to create a dependency on running one of the aforementioned tools to create these clients beforehand, so we may need to create them ourselves. For There's also the issue of the tools you mentioned defaulting to the same client if there's only one (which I imagine is how many people use Kakoune). This would make the jumpclient and the toolsclient or docsclient the same client, which would cause issues when we need to update both in different ways. Overall, although I get you wanting to have it work that way for your use case, making it the default raises a bunch of questions that are neatly sidestepped by using custom clients, and if the user wants to use docsclient and toolsclient, doing so is trivial. Not trying to be combative, by the way - just trying to explain why things are the way they are. I'm certainly open to changing this behavior - I just don't see a good reason to right now. |
Hey, sorry for the very late response What other commands/plugins do is if the clients don't exist they open on the same client. I'm guessing a use case like working on pure console, a server with limited capabilities. Opening new clients might be an issue, as to not create dependencies, or assumptions on environment. Regarding the jump and tools client having to update both in different ways, to be honest I am unsure of the underlying behavior. But may be able to look into it to see if it's an issue... time permitting. My use case is defined by the default behavior of Kakoune, so I don't think this would just apply to me and how I use the editor. It comes with three clients, and various tools/plugins use them. I use docs for vars, tools for stack -- basically I chose docs as I find variables to be reference to the code, and tools as the stacktrace can later be used like grep/find where it can open up code in the jump client... but to be honest, it's just making use of what is already there and not needing to create new ones. I have absolutely no issue using the exiting commands, but I do feel it's a little backwards to have to modify the default behavior to go along with the default clients that exist, but this is your call really :) |
OK, I'm starting to understand where you're coming from, I think. Being consistent with the way other plugins work does have a certain appeal. That said,
This seems to be a conflict of anecdotes - you heavily use The reason I believe the way I do about this issue is, I don't consider what you describe to be the default behavior. Kakoune does not come with three clients (the IDE script is a third party contribution to the wiki, and must be inserted into your config), and as you say, the plugins that ship with Kakoune default to using the same client when The big reason using a single client is problematic here is due to how the buffers are updated. IMO, we simply can't make any assumptions about what environment the user is running, and whether Please know that I am not trying to be combative or dismissive of your suggestions - they are well appreciated and I am frankly flattered that someone found my silly experiment worth using. I simply believe that using If you don't mind, let's get off this tangent and start discussing some of your other suggestions. I had been thinking for a while of doing a thorough rewrite of the Rust side of This would obviously take some time, as I don't have a ton of free time. This wouldn't touch the kakscript too much, though, which would leave you free to implement the stacktrace stuff if you wish. I would also like to direct you to pesticide, which is another DAP client designed to work with Kakoune that is in early alpha. It has a different approach to things, using a separate terminal window as the debugger window, which eliminates the clients issues we've been discussing. Some inspiration could potentially be taken from there (I'm definitely going to be borrowing ideas from the code). |
Hey, sorry... I've been swamped. Yeah, also tagbar adds a different window. I think it makes sense for these use cases. Let's just leave it at that and I'll use the recommended approach, not a big deal. That being said I regularly use the plugin, and works well. Settings breakpoints while debugging would be great! I'm in the same boat, and my contribution here was more out of need to make reading variables/interaction a little easier. So I hope to contribute the stacktrace stuff later. Interesting, will have to check pesticide out. Thank again for your work! |
Sorry to revive this really old discussion, but I thought you'd want to know that work on this plugin has moved to Sourcehut: https://git.sr.ht/~jdugan6240/kak-dap. I am in the middle of a complete rewrite of
This rewrite also comes with changes to how you'll configure If you want to check it out, check out the |
Hello,
I'm hoping to use this ticket as a platform to discuss a couple of things I have been thinking contributing with. One I have already started work on as it affects my workflow. There are also a feature request, I wanted to know if can be done.
Using default clients for variables/stacktrace
I find that the
dap-setup-ui
anddap-takedown-ui
are perfect for customizing layouts for personal preferences. Though using the clients kakoune already provides might be best for the default behavior:toolsclient
anddocsclient
. Kakoune and most plugins that require output use these. For example:In my case I wrote a script that builds a sort of IDE, based on this: https://github.com/mawww/kakoune/wiki/IDE. So I have my environment setup and the three clients are always used. I have already created a local branch which:
Stacktrace syntax and opening files
I think I will take the time for syntax highlighting, and the
kakoune-find
plugin can be used as a reference for opening the files in the jumpclientDon't show "+" arrow on empty arrays
This is minor, if I can tackle it I will. You can see in it in the screenshot for my pull request for variable syntax hl. While testing I thought something was broken, but it was due to me clicking on the array(0) variables.
Feature request
Is it possible to toggle breakpoints after the debugging session has started?
Please let me know your thoughts. They are minor things, and I can definitely contribute on the first three -- definitely going to wrap up the first one soon and can provide a pull request. Just wanted to know your thoughts.
The text was updated successfully, but these errors were encountered: