Is it possible to debug a program that requires input from the terminal in VSCode/VSCodium?
from dr_robotBones@reddthat.com to programming@programming.dev on 08 Jun 19:18
https://reddthat.com/post/67159219

Though I primarily use vim, I got VSCodium so I could use it as a debugger since its much easier to set up. I am having alot of trouble getting any use out of it though, when I run the program the IDE gives me errors if I type in the debug console, and closes the terminal if I type in the integrated terminal. I’ve changed the config to allow integrated terminal, but nothing has changed.

Can anyone help me figure this out, or recommend an alternative tool for debugging a C# program?

Edit: I finally found my answer: discuss.cachyos.org/t/…/16493

Unfortunately there is no FOSS way to debug a C# application in VSCodium. Might have to see what this lldb tool is.

#programming

threaded - newest

Feyd@programming.dev on 08 Jun 19:32 next collapse

code.visualstudio.com/…/debugging-configuration

dr_robotBones@reddthat.com on 08 Jun 19:44 collapse

Yes that’s how I set it to integratedTerminal

Edit: That probably is the solution on VSCode, but I found out the only debuggers available on VSCodium do not have anyway to connect to the terminal

Feyd@programming.dev on 08 Jun 20:47 collapse

That could be. I think c# in vscode proper has some proprietary secret sauce :(

abbadon420@sh.itjust.works on 08 Jun 20:09 next collapse

I use jetbrains ide’s, but I imagine you can set your run environment with parameters.

dr_robotBones@reddthat.com on 08 Jun 20:37 collapse

It seems JetBrains or the proprietary version of VSCode are the only convenient options, but they’re so intrusive…

nark3d@thelemmy.club on 09 Jun 13:01 next collapse

The limitation is the debug adapter, not VSCodium itself. The FOSS C# adapter, netcoredbg, can’t feed stdin through the integrated terminal. Only Microsoft’s vsdbg does that, and its licence ties it to official VS Code and Visual Studio. The way round it that’s worked for me is to skip launch mode and attach instead: start the program yourself in a normal terminal, then use an attach configuration to hook netcoredbg onto the running process. You get breakpoints and inspection, and since it’s a real terminal the stdin behaves. Not as smooth as launch, but it stays fully FOSS.

dr_robotBones@reddthat.com on 09 Jun 17:21 collapse

Thank you, I’ll have to research how to do that!

FizzyOrange@programming.dev on 09 Jun 13:58 collapse

Depending on your program you could mock out your terminal input.