eclipse-cdt-cloud / cdt-gdb-adapter

CDT GDB Debug Adapter
Eclipse Public License 2.0
31 stars 41 forks source link

Support integrated terminal #151

Closed a1994846931931 closed 1 year ago

a1994846931931 commented 4 years ago

It's of vital importance that the integrated terminal is supported because many c/c++ programs rely on standard input in which case it's impossible to debug through internal debug console.

Do we have any plans for this?

paul-marechal commented 4 years ago

Set "openGdbConsole": true in your launch configuration, it should open a second GDB interface inside an integrated terminal in your IDE. Unix only.

a1994846931931 commented 4 years ago

Set "openGdbConsole": true in your launch configuration, it should open a second GDB interface inside an integrated terminal in your IDE. Unix only.

@marechal-p Have you tried this on program with standard input like std::cin? It shows me ../sysdeps/unix/sysv/linux/read.c: No such file or directory. error.

Besides, I don't think it's a good idea to open a gdb interface to use. It requires knowledge of gdb and, for many, it's hard to use.

Can't we launch integrated terminal when console is set to integratedTerminal or externalTerminal like most VSCode's extension do? For example, in VSCode's python extension: https://github.com/microsoft/vscode-python/blob/55281bc1f643cb7c2ee1df70323636d6321cecf6/src/client/debugger/debugAdapter/DebugClients/LocalDebugClient.ts#L79-L84

Which leads to https://github.com/microsoft/vscode-python/blob/55281bc1f643cb7c2ee1df70323636d6321cecf6/src/client/debugger/debugAdapter/DebugClients/LocalDebugClient.ts#L156

paul-marechal commented 4 years ago

My bad, I misunderstood. So running the inferior into an actual terminal displayed in the IDE, good idea!

jonahgraham commented 1 year ago

This is essentially the same request as #161 - closing this copy as #161 has more details.