Search code examples
visual-studio-coderos

I get the "command 'vscode.previewHtml' not found" on Visual Studio Code when I start ROS core


I run visual studio code on Ubuntu 18.04. I develop a software on the Robotic Operating System. When I launch ROS on visual studio code, I get this message : "command 'vscode.previewHtml' not found"

What should I do ?


Solution

  • If you are using this ROS extension by ajshort, then it's an extension problem. There is nothing you can do but to report it to the extension author... and I already did that here: https://github.com/ajshort/vscode-ros/issues/27:

    https://github.com/ajshort/vscode-ros/issues/27#issue-421388056

    I'm getting the following warning from VSCode:

    Extension 'ajshort.ros' uses the 'vscode.previewHtml' command which is deprecated and will be removed soon. Please file an issue against this extension to update to use VS Code's webview API.

    https://github.com/ajshort/vscode-ros/issues/27#issuecomment-502516232

    The vscode.previewHtml has been completely been depricated here microsoft/vscode#62630 and instead the webview api should be used. https://code.visualstudio.com/api/extension-guides/webview

    Unfortunately, that ROS extension has been deprecated, the Github repository (source code) has been archived, so that issue won't be resolved. You should now use the new ROS extension by Microsoft: https://marketplace.visualstudio.com/items?itemName=ms-iot.vscode-ros, which is a fork of the same ajshort's extension and is now the one actively maintained.

    Note: A newer version of this extension has been published as ms-iot.vscode-ros. Please uninstall this extension and install the new one.