-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to pass input to the console in vscode mode #80
Comments
@fenixjiang you can run application in separate console and attach to it from debugger. @viewizard could share references to code. |
We don't support VSCode "console" configuration parameter from VSDBG debug adapter from omnisharp. Only in this way netcoredbg could support "console" configuration parameter and provide additional socket connection (for example) to debug adapter in order to work with stdin via external console (forward stdin from debuggee application to IDE). |
Hello, thanks for the great work you're doing, this project is a lifesaver for those willing to use neovim since ms doesn't allow us to use the vscode debugger. While the lack of "console" parameter support is not a blocker by itself it'd be really great if it was supported. Do you have any plans to add it in the near future or it's not under consideration? |
@6a6ai unfortunately there is no time for this feature since it's require bug refactoring and affect Linux and windows platforms but we're open for community commits. |
In case it might help someone I've been trying to figure out how to debug and get some input together. Best I've gotten looks like this so far: # terminal a)
dotnet build
dotnet bin/Debug/net7.0/csharp-test.dll
# terminal b)
dbgpid=`ps -ef | grep csharp-test.dll | head -n 1 | xargs -L1 bash -c 'echo $1'`
/path/to/netcoredbg --attach $dbgpid --interpreter=cli
# NOTE: xargs option syntax is -l instead of -L1 for linux I believe (I'm on mac) This has major drawbacks vs using the vscode mode with repl as it doesn't show as much information without requesting it. There's also needing to know which lines take input (and flopping between terminals) as it seems to just skip it if you step through it. I only just found this pattern and probably will avoid it since it is a bit harsh to use. If I find any other helpful info I will share. Not sure if you can setup breakpoints either so you need to find a way to pause the program and continue stepping from the debugger once attached. Messy but can work in a pinch perhaps. Now that I got something I'm going to avoid it :). |
start netcoredbg.exe with
--interpreter=vscode --server
, to debug a console app. I had add a request to pass user input to netcoredbg. but how to pass this input to the debugee?I found there is a
ManagedDebugger::ProcessStdin()
, used by cliprotocol to pass data to debugee stdin, but not used by vscodeprotocol.Does some one can give me some suggestion or guide?
The text was updated successfully, but these errors were encountered: