Termdebug for Windows: why a "prompt" buffer instead of a terminal buffer?

Yametazamwa mara 33
Ruka hadi kwenye ujumbe wa kwanza ambao haujasomwa

Ubaldo Tiberi

hayajasomwa,
7 Mei 2024, 09:34:317 Mei
kwa vim...@googlegroups.com
Hi all,

I have noticed that Termdebug for Windows uses a "prompt" buffer instead of a terminal for the gdb interpreter. 

  - Is there any reason why is that? 
  - Is there any plan to "upgrade" the Termdebug Windows version to use a terminal buffer instead?  

Thanks!

/Ubaldo

Alessandro Antonello

hayajasomwa,
8 Mei 2024, 19:48:068 Mei
kwa vim...@googlegroups.com
Hi, Tiberi.

You should take a look in the help of 'termdebug-prompt'. There you can find why your Vim version is using prompt instead of terminal.
I hope this message reaches you.

Regards,

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BnhgoMvaBm_EMyQut%3DGtC_ax0LowK4dv_xWMmQR3%2BbYcMniHw%40mail.gmail.com.

Ubaldo Tiberi

hayajasomwa,
9 Mei 2024, 02:18:009 Mei
kwa vim_use
Hi! 

I thanks  for your reply.
have already read it but It didn’t answer any of my questions. 

Best,
/Ubaldo

Christian Brabandt

hayajasomwa,
9 Mei 2024, 03:08:209 Mei
kwa vim...@googlegroups.com

On Mi, 08 Mai 2024, Ubaldo Tiberi wrote:

> Hi! 
>
> I thanks  for your reply.
> have already read it but It didn’t answer any of my questions. 

I think the reason is, that on Windows using a pty may not always work.
This is briefly mentioned at :h 'termwintype'. If you sure it works for
you (because your Windows is new enough or you have winpty), you could
give it a shot in termdebug with the following patch applied and then
setting the termwintype option:

```patch
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 50833f0df..8236fc2b0 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -196,7 +196,7 @@ func s:StartDebug_internal(dict)
elseif exists('g:termdebug_use_prompt')
let use_prompt = g:termdebug_use_prompt
endif
- if has('terminal') && !has('win32') && !use_prompt
+ if has('terminal') && (!has('win32') || !empty(&termwintype)) && !use_prompt
let s:way = 'terminal'
else
let s:way = 'prompt'
```

Thanks,
Chris
--
Confess your sins to the Lord and you will be forgiven;
confess them to man and you will be laughed at.
-- Josh Billings

Ubaldo Tiberi

hayajasomwa,
9 Mei 2024, 03:09:189 Mei
kwa vim...@googlegroups.com
I meant, I read ‘termdebug-prompt’ :-) 

Best,
/Ubaldo

Il giorno 9 mag 2024, alle ore 08:18, Ubaldo Tiberi <ubaldo...@gmail.com> ha scritto:

termdebug-prompt'

Ubaldo Tiberi

hayajasomwa,
9 Mei 2024, 03:15:479 Mei
kwa vim...@googlegroups.com
Ok! Makes sense! Thanks!

But that lead me to the following question: why use gdb mi instead of term_sendkeys, jobs and channel?

That way we would be OS independent and we would also not depend on external tools features (in this case gdb mi) for which we have zero control.

… genuinely asking. :-)

Best,
/Ubaldo

> Il giorno 9 mag 2024, alle ore 09:08, Christian Brabandt <cbl...@256bit.org> ha scritto:
>
> 
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/5EK-lEmgPto/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zjx2WJlua8j1jQAa%40256bit.org.

Christian Brabandt

hayajasomwa,
9 Mei 2024, 03:27:439 Mei
kwa vim...@googlegroups.com

On Do, 09 Mai 2024, Ubaldo Tiberi wrote:

> Ok! Makes sense! Thanks!
>
> But that lead me to the following question: why use gdb mi instead of
> term_sendkeys, jobs and channel?

jobs and channels will always be used. Using term_sendkeys sounds
brittle however.


Thanks,
Chris
--
Moon, n.:
1. A celestial object whose phase is very important to hackers. See
PHASE OF THE MOON. 2. Dave Moon (MOON@MC).

Ubaldo Tiberi

hayajasomwa,
9 Mei 2024, 03:35:539 Mei
kwa vim...@googlegroups.com
Yeah. In-fact there are apparently no reasons to use term_sendkeys…

Best,
/Ubaldo

> Il giorno 9 mag 2024, alle ore 09:27, Christian Brabandt <cbl...@256bit.org> ha scritto:
>
> 
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/5EK-lEmgPto/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zjx648DK4ZLE4nch%40256bit.org.
Jibu wote
Mjibu mchapishaji
Sambaza
Ujumbe 0 mpya