Giter VIP home page Giter VIP logo

Comments (7)

joonty avatar joonty commented on July 19, 2024

Hi,

It's actually much simpler than you think - Vdebug handles the closing of windows. When you've finished debugging, just press the key that maps to g:vdebug_keymap['close']. This will wipeout all buffers that relate to vdebug and close the vdebug tab - you shouldn't need to do any of that yourself.

However, I'll put in a fix that means an error isn't thrown if the user closes the tab manually, as it seems like that's the problem you're having.

Thanks

from vdebug.

grota avatar grota commented on July 19, 2024

Thanks for adding the check, it's a very welcome addition as far as I am concerned.

Question 2 above is solved, I basically had it mapped to F11 but Xorg stole that keystroke to put the terminal fullscreen. Sorry for having bothered you with that.

Question 3 actually makes vim crash. I basically start debugging and then due to my fat fingers I close the DebuggerWatch window (but I guess other people will want to close it intentionally to save screen space).
After that starting another connection is impossible with this error

"DebuggerWatch" [New File]
E37: No write since last change (add ! to override)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/grota/rcfiles/vim/dotvim/bundle/joonty_vdebug/plugin/python/start_vdebug.py", line 30, in run
    self.runner.run()
  File "/home/grota/rcfiles/vim/dotvim/bundle/joonty_vdebug/plugin/python/vdebug/runner.py", line 135, in run
    self.open()
  File "/home/grota/rcfiles/vim/dotvim/bundle/joonty_vdebug/plugin/python/vdebug/runner.py", line 63, in open
    self.refresh(status)
  File "/home/grota/rcfiles/vim/dotvim/bundle/joonty_vdebug/plugin/python/vdebug/runner.py", line 99, in refresh
    self.get_context(0)
  File "/home/grota/rcfiles/vim/dotvim/bundle/joonty_vdebug/plugin/python/vdebug/runner.py", line 110, in get_context
    self.ui.watchwin.accept_renderer(rend)
  File "/home/grota/rcfiles/vim/dotvim/bundle/joonty_vdebug/plugin/python/vdebug/ui/vimui.py", line 300, in accept_renderer
    self.write(renderer.render())
  File "/home/grota/rcfiles/vim/dotvim/bundle/joonty_vdebug/plugin/python/vdebug/ui/vimui.py", line 388, in write
    Window.write(self, msg, after="normal gg")
  File "/home/grota/rcfiles/vim/dotvim/bundle/joonty_vdebug/plugin/python/vdebug/ui/vimui.py", line 219, in write
    self.create()
  File "/home/grota/rcfiles/vim/dotvim/bundle/joonty_vdebug/plugin/python/vdebug/ui/vimui.py", line 273, in create
    vim.command('silent ' + self.open_cmd + ' ' + self.name)
vim.error

Trying to quit vim I see that the DebuggerWatch buffer is empty (but marked as modified with changes to be saved). I :bd! that and I get a crash to terminal with

Vim: Caught deadly signal ABRT                                                                                                                                                                                                      
Vim: preserving files...                                                                                                                                                                                                            
Vim: Finished.
Aborted (core dumped)

Would it be possible to have Vdebug's 3 windows togglable like the breakpoint one?

from vdebug.

joonty avatar joonty commented on July 19, 2024

Sorry - failed to read your original post all the way through! It's a good point, maybe all windows should have a open/close toggle.

I'll take a look at this and will link updates in this issue.

Thanks

from vdebug.

joonty avatar joonty commented on July 19, 2024

Hi @grota, sorry for neglecting this issue!

It might be worth pointing out that the vdebug tab shouldn't be closed with :tabclose: just press the stop button again (defaults to <F6>).

I just did an experiment where I used :tabclose after the debugging session closed, and it caused all sorts of problems on the next startup, which is probably what you're seeing.

Anyway, that's an oversight on my part really. It should behave better if you close it using vim commands, so I'll take a look at what can be done to sort that out.

Thanks

from vdebug.

qstrahl avatar qstrahl commented on July 19, 2024

You should be able to leverage the BufUnload or BufDelete autocmd events for this purpose.

from vdebug.

grota avatar grota commented on July 19, 2024

@joonty no worries man, we all do this on our spare time

from vdebug.

joonty avatar joonty commented on July 19, 2024

@qstrahl that's perfect for what this needs, thanks. I'll look into implementing that.

from vdebug.

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.