then do Shell Command : Install code in PATH as above after the attribute has been removed, and it should persist after restart.Ĭredit: article linked to by RicardoVallejo in this comment. If that does return, you can remove the attribute using the same command with the -d flag (alongside -r to recursively remove it from all contained files and sudo to allow the change): sudo xattr -r -d "/Applications/Visual Studio Code.app"
To check if this attribute is applied, look for in the list returned by this command (changing the path if that's not where you installed it): xattr "/Applications/Visual Studio Code.app" This may happen if MacOS has applied the quarantine attribute to VS Code, which the OS uses for the "Are you sure?" notice applied on first using apps downloaded from the internet. Many Mac users find this is forgotten and needs to be re-applied after any restart. To make this change persist after restart on MacOS Select Shell Command: Install code in PATH from suggested list.Open the command pallette with Command + Shift + P (or F1) Install the Code Runner Extension Open your C++ code file in Text Editor, then use shortcut Ctrl+Alt+N, or press F1 and then select/type Run Code, or right click the Text Editor and then click Run Code in context menu, the code will be compiled and run, and the output will be shown in the Output Window.According to the docs on Launching from the command line: