Guidelines on how to create link VS Code with a custom language's Debug Server coded in C++ - visual-studio-code

I've been working on small UI stuff in a VS Code extension and I think the documentation is great overall. But recently I've been asked to link VS Code to a C++ server so that it can automatically communicate with the c++ server. I've been trying for a few days with the help of Mock Debug but I can't make it work...
I don't understand what are "the core classes" or "core steps" in linking VS Code debug with an external DAP server.
I mostly tried to work in the package.json file. From what I understood what's needed :
In package.json/contributes
-> debuggers : is where you declare your debugger and link it to a language. Then you can setup the custom configurations for launch.json.
-> The debuggers/program parameter is intringing to me, it should give the path to the Debug Adapter executable... In my case would it be a typescript that opens a connection to the actual c++ DA server?
I'm sorry if this thread is disjointed, I'm quite a chaotic programmer (fancy saying for completely disorganised) but I really need a helping hand...

Related

Robot Framework Language Server Extension automatically opening CANoe application

I use Visual Studio Code with Robot Framework and Python for test purposes. I also use CANoe application as a simulator.
I installed the Robot Framework Language Server and for some reason when I open VSCode or even just click on it CANoe automatically opens, I know that the extension is causing this because if I disable the extension the application stops to automatically open.
Do you already had any similar behavior with Robot Framework Language Server and any other process? If yes, how did you solve it?
There are 2 different LSP implementations for robot framework. This answer relates mainly to the one Robocorp maintains.
That particular implementation of lsp works by executing each LIBRARY settings section in python interpreter and executing the actual library's constructor to get the data it needs for auto completion / typing / whatnot. If the python library makes any connection to com API thats associated with CANoe during execution of the constructor, it will trigger actual CANoe application to start - even if that's not mandatory at this point but that's how COM works.
I'm quite there are ways to hack around the issue but essentially, the easiest way to fix this is to;
Fix the library that provides your keywords that interact with CANoe and/or ecutest or similar that requires CANoe to be running.
Try switching to https://github.com/d-biehl/robotcode within vsc to provide you autocomplete and the rest ..
If you where using robotcode lsp, see first suggestion.

Winsock Coding Issue

I am trying window socket programming in c++.I am using winsock2.h for this purpose.i am doing this in code blocks using GNU GCC and getting errors as shown in attachment as you can see.This is important to know that I trying just client server model.
I am not putting my code here because code is available on msdn(I have just copied from there).I am just providing link
Server code
https://msdn.microsoft.com/en-us/library/windows/desktop/ms737593(v=vs.85).aspx
client code
https://msdn.microsoft.com/en-us/library/windows/desktop/ms737591(v=vs.85).aspx
Posted a comment, but confident enough to make an answer...
The screenshot you included shows Linker errors, so everything is probably compiling correctly. To use WinSock2, your program must link with Ws2_32.lib, which is a standard system library included with the Windows SDK.
SDK stands for Software Development Kit. It contains many header files and libraries that are needed to write software for Windows. Sorry if this is too basic, but... You included the header file WinSock2.h. That header only includes the declarations for all the WinSock functions - just a description of the functions. The function definitions (the code for the functions) is located in a library that you have to "link" with. In some cases you will get source code for a library that you can compile with, but most of the time you will only get a pre-compiled LIB file such as Ws2_32.lib. The Windows SDK contains the LIB files for most of the programs you can write for Windows.
For more information search for "linking", "Win32 libraries", and "dynamic link libraries" (DLLs).

What is meant by Runtime of VS Code?

I am totally confused with the ability of VS Code. at one end it says supported runtime is nodejs and asp.net 5 and at other end it says it supports objective-c, php, ruby.
I am not clear. Can anyone please explain ?
Regards
Everything is explained here:
https://code.visualstudio.com/Docs/languages/overview
and here:
https://code.visualstudio.com/Docs/runtimes/nodejs
Objective-c, Php, Ruby, VisualBasic.NET, etc. have only syntax highlighting and maybe some snippets and intelli sense. But you have no ability to debug them in Visual Studio Code.
The runtime means that you are able to run and debug applications in Visual Studio Code. You have support for Javascipt and Typescript via NodeJs and for C# via the ASP.NET5 runtime.

VSCode Not able to edit the code during runtime

I am not able to edit my NodeJS code during the program run-time. HTML and client side JavaScript files are my main goals. Please let me know if there is edit and continue feature available in Visual Studio code
This feature is not yet implemented. But I have already heard requests for it, so you should vote for it here https://visualstudio.uservoice.com/forums/293070-visual-studio-code

GWT Modify file on server

we all agree that when we use GWT, we compile our application on the server, several javascript file are created. Normally, when deploying, we would use the obfuscated mode.
Now modifying a javascript file in obfuscated mode is almost impossible. Now what happens if we want to make some modification in our GWT application.
Do we have to go back again in Java, modify the file, compile, and then deploy again??
I'd say yes... If you use a code generator you should avoid modifying the generated code by hand.
No, no, no.
You don't "go back" to the Java code to modify it. You simply debug, test and modify the Java code. You ignore the code in the compiled javascript files except to deploy it. As far as you are concerned, GWT source code is Java code, not javascript, written within the environmental restriction of the browser.
Your question is like asking, "I have a C application that gets compiled to object code. Do I modify the object code or go back to the C code to modify it?" !!!
You simply treat the generated javascript as "native code".
No doubt you can include javascript using jsni, and so can you include assembly code when using C. So except for those assembly code you inject and similarly except the javascript code you include, you leave the "native code" alone.
When you try to modify the object code generated from C, that is called hacking. Hacking is an interesting hobby but when you wish to create an application and your main task is not "hacking", hacking would only be your extra-curricular activity not connected to your main employment or project.
Go back to the beginning: http://code.google.com/webtoolkit/overview.html
...Write AJAX applications in Java and
then compile the source to highly
optimized JavaScript that runs across
all browsers
When you're ready to deploy, GWT
compiles your Java source code into
optimized, stand-alone JavaScript
files that automatically run on all
major browsers, as well as mobile
browsers for Android and the iPhone.
While debugging: if you are running in development mode you may not even have to redeploy while in dev.
Thanks to the GWT developer plugin,
there's no compiling of code to
JavaScript to view it in the browser.
You can use the same edit-refresh-view
cycle you're used to with JavaScript...