netcoredbg: Cannot receive request in VSCode mode
- Start netcoredbg with arg: “–interpreter=vscode --server”
- My DapClient like this:
var endPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1", 4711));var socket = new Socket(AdressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);socket.Connent(endPoint);var stream = new NetworkStream(socket);var options = new DebugAdapterClientOptions().WithInput(stream).Withoutput(stream);var client = DebugAdapterClinet.Create(options);await client.Initialize(System.Threading.CancellationToken.None); <----run to here and block !!! - In server side(vscodeprotocol.cpp)
at func
std::string VSCodeProtocol::ReadData(){...std::getline(cin, line);if(! cin.good()){//Always run to here, even if DapClinet is just connected, before sending the initialization command。}...}
Is there anything I missed? I am not good at English, I hope my description clears up my problem. Thanks.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 29 (18 by maintainers)
Commits related to this issue
- add patch for https://github.com/Samsung/netcoredbg/issues/71 — committed to consulo/netcoredbg by VISTALL 2 years ago
From the very beginning, I modified the code according to kfrolov’s suggestion to solve the communication problem in VSCode mode, so far it is running well, but I don’t know if these modifications are the best practice.
Hereis my modifications:
}