ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can create a .env file with a PYTHONPATH variable with all the source paths in it, then reference this file from the python.envFile setting in VS code. This path will only be used by the python extension tools and not by the terminal. In this way when running from the terminal you are still running in a "deployed" situation from devel but the tools can still find the source files. It isn't the prettiest but it is a work around.

https://stackoverflow.com/questions/53653083/how-to-correctly-set-pythonpath-for-visual-studio-code https://code.visualstudio.com/docs/python/linting#_pylint