Debugging functionality #9
Replies: 11 comments
-
|
thanks @mattiapirovano. this will probably be more suitable for a discussion post. However, this is a good idea, and I will look into developing such feature. |
Beta Was this translation helpful? Give feedback.
-
|
I played around with it. I released a new update with a simple debug feature. I may enhance it later on based on user feedback. If you are really interested in an enhanced version please consider openining a discussion and tell me about your specific needs and ideal behavior. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, i appreciated a lot what have you done. Yeah i'm really interested because i program a lot using both Matlab and Python. For the last one i use the well-known nvim-dap and nvim-dap-ui plugins to debug codes. For Matlab instead there is no possibility to debug using these plugins. And i really need debug functionalities in my workflow. To improve again what you have already done i would like to have also the possibility to see which line i am on with the debugger (right now i see only breakpoints). It would be nice also to have the breakpoints like they were before this last update (with all the line highlighted in red). Another nice-to-have is a way to see directly the workspace while debuging, to be able to see the variables without having to call them directly each time we move forward in the code. A final nice-to-have is something like the bar with buttons that is present in the vscode debugger (that is the same used in dap-ui plugin). I know that it is a lot of things (so a lot of work for you). I just wanted to present my pov about the question. Thank you for your time. |
Beta Was this translation helpful? Give feedback.
-
|
After the last update, i have encountered two bugs using the plugin: 1. Despite the option force_nogui_with_breakpoints = true, when i stop at a breakpoint, matlab gui pops up; 2. If i start debugging entering the debug mode, at one poi if i just want to finish the run of the code, so using continue functionality, for some reason matlab says that i have an error in the code. This is not happening if i run the complete script (using mr, i.e. without entering debug mode). |
Beta Was this translation helpful? Give feedback.
-
|
I hear you. I am working on fixes and improvements. Please consider starring the repo to help bring more exposure and contributors to make this plugin better |
Beta Was this translation helpful? Give feedback.
-
|
Yuup. Thank you for your work. If you need something just ask me. I really appreciate what are you doing. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your input! Feel free to open a discussion and we can plan a PR. I am more than happy incorporating your code. ps. I played around with integrating dap/dap-ui etc, but it was not trivial. I managed to produce a bit more complex debugging than the initial effort, but have not tested it extensively. Please let me know if you run into bugs so I can work on them or feel free to submit PRs |
Beta Was this translation helpful? Give feedback.
-
|
Hi, thanks again for the improvements. I found several bugs in your last commit. First of all, when i open a Matlab file nvim prints an error related to starting matlab. Despite this, matlab opens and works correctly. The other major bug is that figure windows do not pop-up. So, right now, it is not possible to see figures (despite i set "DISPLAY = ':0.0'" in configuration file). For what concern debug functionalities, there are some issues. The debugger works, but, for example, the "line indicator" is bugged, most of the times does not update to next line when stepping over. Minor issues are related to the different windows. The most important is related to the variables window. If i open this window and stepping over my code lines, at each step it updates itself but not correctly. It seems that instead of updating the variable list it is adding a new one at each step (so it is like variables double at each time step). The last important thing is related to the debug bar. It is really useful but it has one "big" problem. The f-commands work only if i click on this bar, so if "I'm in the status bar with my pointer". It is uncomfortable that at each step, the pointer is moved in the code window, so for advancing using again f-commands i have to click on the debug bar manually and only after that i can press the f-command. The last thing is an idea that i want to share with you. It would be nice to have the possibility to open, together with the command window tmux pane, another tmux pane with the workspace (like it is in the matlab GUI), such that it would be always possible to see which variables are already present. Thank you again for your work and your time. I'm really appreciating that. Sorry if I'm only "using you" right now but I'm not good programmer. I'm an engineer and i program only using MATLAB, Python and C. So i think that it is useless, or better dangerous, to let me touch the plugin code. So I'm trying to help you as much as i can giving you feedback and suggestions. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your suggestions. I am also not the best lua developer and am vibing my way into expanding this project. following your points:
the workspace is quite challenging. I will notify you when im done with it. p.s. i accidentally worked on main and may have broke a bunch of things. it will not happen again. srry in advanced if i disrupted your work. Ido |
Beta Was this translation helpful? Give feedback.
-
|
Ty Ido. Now things seems to be working in the right way. I can easily debug now. Let me know if u need something else in terms of suggestions/improvements. I'm here. |
Beta Was this translation helpful? Give feedback.
-
|
great. happy to hear. Going to close this thread then. I am always happy to hear suggestions and improvements. The more detailed, the better I can attend to it. In the future, feature suggestions should go to discussion. I would say one post per feature. Bug reports though should go here. Best, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm opening this issue to ask if it is possible to introduce the debugging functionality in the plugin, in order to be able to use continue, step forward, step in (etc...) functions. This would be greatly appreciated. I'm asking this because right now there is no way to debug matlab files in neovim (for example using nvim-dap). Thank you in advance for your time.
Beta Was this translation helpful? Give feedback.
All reactions