ros-industrial / ros_qtc_plugin

ROS Qt Creator Plug-in (https://ros-qtc-plugin.readthedocs.io)
400 stars 214 forks source link

"Start and Debug External Application" misses ROS symbols/paths #384

Open beetleskin opened 5 years ago

beetleskin commented 5 years ago

When I want to use the debug-mode "Start and Debug External Application" on any ros-based executable, gdb complains about missing libraries. E.g. try to start the roscpp_tutorials talker:

/opt/ros/melodic/lib/roscpp_tutorials/talker: error while loading shared libraries: libroscpp.so: cannot open shared object file: No such file or directory

This prevents me from starting my nodes with gdb, which is quite useful.

This works fine when I run qtcreator_ros from terminal with sourced catkin workspace.


Btw, is it possible to debug launch-files with qtcreator_ros? Or easily start rosrun commands with gdb?

Levi-Armstrong commented 5 years ago

I can think of two things.

1) If you have not build the project in Qt Creator then it environment is not setup for your workspace and the environment being passed to the process launching your process is not correct.

2) The Qt Creator environment is not being passed to the process used to launch the external application. This may be the intended behavior of this since it says external application. I typically use the two above this Attached to Started or Unstarted Application.

beetleskin commented 5 years ago

Since the other debugging flavors work, I think it must be option 2.

I also rather attach, but sometimes there's stuff going on right on initialization of a ros node, which is then not captured.

Btw. it works also well, if I define the application as Run configuration.