I am wondering if something is wrong with my computer (or myself), because I can't seem to drag & drop a file into Visual Studio Code to open it in the editor. Closing an opened folder first doesn't make a difference. VSCode always shows me the 'stop sign', in every spot I tried (the editor, the opened tab bar, an existing opened file, ...).
Why does VSCode block this ?
(I have experienced this in earlier versions as well. Currently on v1.6 on Windows 7.)
Open VSCode. Open an Explorer Window. Try to drag and drop a file into the editor window. A "no drop" cursor appears.
Quick file navigation# Tip: You can open any file by its name when you type Ctrl+P (Quick Open).
Select your 4 values below and cut ( CTRL + X ), then place your cursor to the right of your first line comma, hold down CTRL + ALT then press down on the arrow key 4 times to multi-select your target lines. Then press CTRL + V to paste the values.
Searching for a solution, I stumbled on this page, where one commenter explains:
I think you are running into the security issue where lower permission processes cannot send messages to higher permission processes. Explorere.exe, running at normal permission levels, cannot send the window message to winword.exe, running elevated.
I am indeed always running VSCode as Administrator, but not my Explorer windows.
When I run VSCode in non-administrator mode (so just my regular user), drag-and-drop works fine.
I feel silly as I lost 15 minutes looking into this. In case it helps:
Make sure you are not trying to open files from a zip file...
Cheers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With