Porting Visual Studio Code to Visual Studios 2019/2022
I have a unique scenario.
I’ve currently a virtual machine running on Ubuntu that cross compiled for a Gentoo Linux. Im able to build (in C++), using VS Code, cmake and target the Gentoo platform using remote gdb by configuring the launch.json file.
Now, because this set of codes is supposed to work on multiple platforms and also several unit testing frameworks, we find it easier to have all the configurations on Windows. The reason is because the platforms are given by our platform suppliers who some also gave us customized Cygwin/Mingw environments to cross compile for their platform.
I’ve ported the cmake folder on Windows. Via Visual Studios 2019 cmake, I’m able to remotely build into the Ubuntu virtual machine which can be deployed in the target machine as well. Ie. Able to upload/run on platform if I use their tool to copy into their platform.
However, can I run the debugger on Windows to now target on the Gentoo platform instead of the Ubuntu VM? Given the same binary?
I’m able to do so, using VsCode.
I tried to use similar configurations for launching (debugging) for vscode. it’s not recognised by visual studios 2019. Ie. vS code uses launch.json 0.2.0 and visual studios uses launch.vs.json 0.2.1. The syntax are similar but in vscode, I do not need to specify the midebuggerpath in VSCode but it seems to be mandatory in visual studios. I’ve no idea where the gdb for the platform resides.
Just a background, when I use Windows to target the Ubuntu (Visual Studios 2019), I use the ssh remote connections. But when between Ubuntu and Gentoo (Working via VS code). We just need to specify the midebuggerserveraddress with launch settings. The vendor providing us the Gentoo platform did not have us the necessary permissions to ssh to their platform.