Posts: 10
Threads: 2
Joined: Aug 2022
Reputation:
2
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?
Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
09-04-2022, 09:01 AM
(This post was last modified: 09-04-2022, 10:08 AM by Brian Beuken.)
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
Posts: 10
Threads: 2
Joined: Aug 2022
Reputation:
2
Ah, there’s a setting to make that show on the target! Thanks, that solved the problem.
Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
09-04-2022, 10:08 AM
(This post was last modified: 09-04-2022, 10:15 AM by Brian Beuken.)
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
Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
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
Posts: 10
Threads: 2
Joined: Aug 2022
Reputation:
2
Thanks Brian, that was really informative!