Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Window doesn't open on Pi
#1
It's not so much that my code won't work as it is that it doen't work how I think i should.

Having built and run the first triangle example, VisualGDB asked me to install XMing so that it could display the X11 session on my Windows box. I'm building on the Pi currently, not cross-compiling.

I was expecting the graphics to show up on the actual Pi's X11 session; that's what it looks like happens from the screenshot in the book.

VisualGDB only has a "Local Windows Debugger" option available in the dropdown (VS2022, Win11). However, I've only recently moved back to Windows from macOS and I usually use VSCode and/or the Jetbrains IDE's, so it's possibly just not knowinbg where to click!

How do I launch the program (in debug mode and normal running mode) on the Pi from my development host?
Reply
#2
I've never found that to be very functional, in theory an X11 linux system acts as a server, and can send its screen to any X11 client but its just too slow and impractical so I don't recommend it. As good as VisualGDB is it was never really designed for the Pi specifically and some of its features work better than others, In principle it does work, I've had one occasion where I magically got a screen to appear but that was quite some time ago and since it covered my console output on VS I didn't use it again. I just tried it now and yup, I got something but just a grey screen.

So I 'd chalk this down to, if I want to mess about I can probably get it working but its not worth the effort, so In the VGB Debug settings set the gui to show on target and make sure your Raspberry has a montior connected.
BUT if you dont' have a monitor or you really want to see the output on your PC, VNC is a much much better system and works perfect to get your screen on the PC as you are running the debugger. Activate it on your Pi's properties and install the free vnc viewer rom reakVNC

To auto launch the program for VS you just need to have the project settings in VisualGDB (not the project properties) and ensure that your main build/debug is set to your raspberry IP,

Let me know if this helps.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#3
Ah, there’s a setting to make that show on the target! Thanks, that solved the problem.
Reply
#4
I made a small video to try to help

it's still processing on Youtube but it might clarify things

https://youtu.be/Xo6ND2i9p-A
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#5
this is quite cool, using my old video software to make that small video I was prompted to pay for an upgrade which I did... and it gave me the ability to do this.


which is nice

https://youtu.be/Vv76fjVyFp4
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#6
Thanks Brian, that was really informative!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)