code-debug icon indicating copy to clipboard operation
code-debug copied to clipboard

add communication layer between frontend and backend

Open GitMensch opened this issue 3 years ago • 2 comments

For different issues we need a communication between frontend and backend.

Originally posted by @GitMensch in https://github.com/WebFreak001/code-debug/issues/325#issuecomment-1060743744

This is a show-stopper for at least #325, #326 as well as #132. This is likely also needed for #318 #319 as all those are frontend related.

I do know that it is possible to send "CustomEvents" but I'm not sure if this would be enough for communication.

What seems possible is to open a local socket and send messages in both directions.

GitMensch avatar Mar 07 '22 14:03 GitMensch

See https://github.com/Microsoft/vscode/issues/49389

WebFreak001 avatar Mar 07 '22 19:03 WebFreak001

Yes, that sounds like the correct approach. Do you mind adding an example? A good case would actually be #326 - the code on the extension side is technically the two liner presented there. That would be only the "backend to frontend" part, but that would be already very useful on its own. As a second part for the other way around could be worked on with #325.

GitMensch avatar Mar 07 '22 20:03 GitMensch