Unable to add Visual Studio Code app's icon to macOS Dock
Have I accidentally banned Visual Studio Code.app from the macOS Dock?


No.


  How do I resolve the issue and get the app icon to show in the Dock?


You can try resolving the issue by killing the Dock process and re-launching it afresh. To do that, launch Terminal.app and execute the following command-line:

killall Dock

The command-line is case sensitive. Once executed, the Dock would momentarily disappear and then reappear.  Now you should be able to add the Visual Studio Code.app icon normally by dragging in the app bundle. You should also be able to see the icon normally when the app is running.