How to setup custom debugging command with VirtualGL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to setup custom debugging command with VirtualGL

zzzhhhzzzhhh
For some reason, I can run an OpenGL program correctly only within VirtualGL (https://cdn.rawgit.com/VirtualGL/virtualgl/2.5.2/doc/), that means I have to run command line vglrun my_opengl_app in order for my OpenGL program to run without error. The CLI is not only awkward, but also disables me to debug line by line in NetBean IDE. I don't know how to set up the debugging environment in such a situation, so I ask here in hope that I could get an answer.

Environment:
Local: Windows 7 with X-Win32 to connect to remote Linux machine.
Remote: Ubuntu 14 with VirtualGL 2.4 installed.
             NetBeans 8.1

What I want to get:
Debug run and debug normally in NetBeans IDE without error. Now I can only run it correctly at full speed in CLI with vglrun prefix, as I mentioned above.

Generation of error:
1)Use X-Win32 to login from Windows to the remote Linux
2)run vglconnect vgl_server to connect to vgl server via ssh
3)in ssh CLI, run vglrun ~/netbeans-8.1/bin/netbeans to launch NetBeans IDE. Note that I run NB in ssh, not from system menus in hope that NB knows it is in VirtualGL. I don't know if it is necessary or, if so, whether this method is correct.
4)debug run my OpenGL program in the IDE and got the error

Methods I have tried but failed:
- Set Project Properties -> Run -> Run Command to: vglrun "${OUTPUT_PATH}" or /usr/bin/vglrun "${OUTPUT_PATH}" while Project Properties -> Debug -> Debug command is blank
I got error when debugging: \"/usr/bin/vglrun\": not in executable format: File format not recognized
- Set Project Properties -> Run -> Run Command to: "/usr/bin/vglrun ${OUTPUT_PATH}"  while Project Properties -> Debug -> Debug command is blank
I got error when debugging: /usr/bin/vglrun /path/to/my/opengl/program does not exist or not an executable.
- Set Project Properties -> Debug -> Debug command to: /usr/bin/vglrun ${OUTPUT_PATH} while Project Properties -> Run -> Run Command is ${OUTPUT_PATH}
I got error when debugging: \"/usr/bin/vglrun\": not in executable format: File format not recognized
-  Set Project Properties -> Debug -> Debug command to: "/usr/bin/vglrun ${OUTPUT_PATH}" while Project Properties -> Run -> Run Command is ${OUTPUT_PATH}
I got error when debugging: /usr/bin/vglrun /path/to/my/opengl/program No such file or directory.
I have no idea what these error messages are talking about.

PS: please don't ask me for the OpenGL code because it has nothing to do with my question. My question is, to simply put, how to setup custom debugging command in NetBeans IDE. Thank you for your help.