X11 Video Driver Not Available When Debugging Linux Raspberry Pi Project from Windows with Visual Studio 2019

Hi. I have created a Visual Studio 2019 Linux and Windows cross-compilation project using LVGL and SDL2. I started with the LVGL PC Simulator Eclipse project that is available at this link https://github.com/lvgl/lv_sim_eclipse_sdl . The Windows program runs and displays properly where it uses the SDL Video Driver named windows. The problem occurs when I run the Linux program on my remote Raspberry Pi from the Visual Studio Debugger on Windows. The Linux program uses an SDL Video Driver named RPI instead of the Video Driver named x11 which is what I want. The SDL Video Driver named RPl appears to be accessing the Frame Buffer directly instead of running on X11. Attached are 2 pictures I took that illustrate the problem. I can’t find any information on the SDL Video Driver named RPl. I wrote some code to query the names of the available SDL Video Drivers when I run my Linux program using the SDL_GetNumVideoDrivers and SDLGetVideoDriver functions. There are 4 drivers returned with the names x11, Wayland, RPl and Dummy. However when I use the SDL_VideoInit function to initialize a driver for each of them the return code is -1 for all of the drivers except RPl. When I call SDL_GetError after trying to initialize the x11 video driver I get the error x11 not available. The other thing to note is that if I run my Linux program by launching it on the Raspberry Pi directly instead of from the Visual Studio Debugger on Windows the Linux program displays properly using the x11 video driver. This is illustrated in my second attachment. I really need to be able to debug my Linux program running on a Raspberry Pi from Windows where it uses the x11 video driver instead of the RPl driver. Any help would be greatly appreciated.

!

This is my second attachment that shows the program displaying properly on the desktop with the x11 SDL video driver. This is what I want when I run the program remotely from the Visual Studio Debugger on Windows.

I did some more testing and when I run my program directly on the Raspberry Pi the SDL_GetCurrentVideoDriver function returns a pointer to the name x11 which is what I want. When I run my program on the Raspberry Pi remotely from the Visual Studio Debugger the SDL_GetCurrentVideoDriver returns a pointer to the name RPI which is a windowless driver. I still need to know how to use the x11 SDL Video Driver when I run my program using the Visual Studio Debugger. As I mentioned the SDL_GetVideoDriver function returns x11 as valid but when I try to create it I get the error that x11 is not available.

Thank You.