简体   繁体   中英

Is drag-and-drop to open a file possible in VSCode?

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.)

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM