none
Drag/Drop not active during debugging???

    Question

  • I have a list box where I want to drag an image file. Allow Drop is set to true and I have 2 events:

    1. A Drop event that changes the listbox background to red
    2. A DragOver event that changes the background to green

    I can browse to the application using IE or Chrome and the behavior works as expected. I drag a file, the mouse changes, the box turns green when I dragover, and red when I drop.

    My problem is that the drag drop behavior does not work when I am debugging (target browser is IE)! The mouse never changes while dragging, the colors don't respond and of course the breakpoints in those events are never reached.

    Has anyone seen anything like this before?

    Thanks in advance. 

    Jim K.

    Friday, October 08, 2010 3:26 PM

All replies

  • Hi,

    I haven't experienced this before. Please try the following steps to find out the problem.  

    1. If you debug it in other browsers like FireFox or Chrome, do you still have the problem?

    2. Have you installed any add-ins? Please check it on "Tools" | "Add-in Manager". If there is any add-ins, disable them and run Visual Studio in safe mode by running "devenv.exe /safemode".

    3. If you create a new user account, do you have the problem? This can help to isolate user profile corruption related causes.

    4. If you reboot the operating system to safe mode, do you have the problem? This can help to isolate whether any other applications are interfering with Visual Studio.

     

    Best Regards,

    Sunday, October 10, 2010 10:12 PM
  • Shi Ding

    1. I tried debugging using Chrome as the default browser and that IS working as expected. I then tried IE again without debugging and that works, but as soon as I set it as the default browser for debugging, it doesn't recognize the drag drop events.

    2. There are no add-ins installed.

    Since I found that using Chrome as the default browser for the drag & drop is working I will use that in the meantime for my testing. This seems to narrow down the issue to IE, but only when used as the default browser for debugging. I can't imagine why IE would stop recognizing the drag/drop events during debugging. It even displays the "invalid badge" mouse cursor as I move the image file into the browser area. I did not try suggestions 3 and 4 above.

    Jim K

    Monday, October 11, 2010 5:42 AM
  • Ok, I have been pulling my hair out in the continuing saga here. Shortly after I wrote my last entry, Chrome stopped working as well. Debugging is not working for any of the events in Chrome or FireFox anymore, there seems to be issues with the symbols loading. I have tried so many things that are recommended out there but I'm having no luck.

    At this point I have resigned myself to going back to IE because at least I can debug other events. So far it appears that my problem is only related to the drag drop events when debugging.

    I did notice that, after trying all the other recommendations for the issue around loading symbols, my .pdb file has shrunk from around 400,000 bytes to about 422. I'm sure there's a connection, but I can't figure out what is needed.

    Jim K.

    Tuesday, October 12, 2010 5:33 AM
  • I came across an additional clue in this affair while reading an unrelated blog. The poster mentioned that they had a similar situation while debugging. It turns out that the problem is that UAC prevents drag-drop operations between processes that are executed by different accounts. In their case (and mine) they were running visual studio as Administrator (elevated). After running as non-elevated it worked fine for them.
    It makes sense, but I have to run VS as admin because I am testing against a local IIS server so I'm kind of damned if I do, damned if I don't. What I don't understand is why I can intermittently do this with Chrome and Firefox although I have yet to figure out what causes it to work for those browsers. It's somewhat a combination of cleans projects, rebuild projects reset startup project, clear browser cache, stand on one foot, wave a chicken over my head...
    Still trying to nail this one down, but trying to keep track here if only for myself...
    Jim K.

    I came across an additional clue on this while reading an unrelated blog. The poster mentioned that they had a similar situation while debugging. It turns out that the problem is that UAC prevents drag-drop operations between processes that are executed by different accounts. In their case (and mine) they were running visual studio as Administrator (elevated). After running as non-elevated it worked fine for them.

    It makes sense, but I have to run VS as admin because I am testing against a local IIS server so I'm kind of damned if I do, damned if I don't. What I don't understand is why I can intermittently do this with Chrome and Firefox although I have yet to figure out what causes it to work for those browsers. It's somewhat a combination of clean the projects, rebuild the projects, reset startup project, clear browser cache, stand on one foot, wave a chicken over my head...

    Still trying to nail this one down, but trying to keep track here if only for myself...


    Jim K.

    Tuesday, October 12, 2010 8:23 PM
  • Jim,

    Thanks for sharing.  This one bit me too.  I tried a couple things:

    1. I started Windows Explorer with "Run as administrator", but I still couldn't drag from this window into the Internet Explorer window where I was debugging.

    2. I started a second IE window and pointed it to the URL of the debugging window.  I could now drag into it, but my breakpoints were not hit.

    I've found several articles on sample drag-and-drop apps, but I haven't found any other mention of this problem.

    Bill

    Monday, February 07, 2011 3:00 PM
  • I have this problems too.

    To enable drag&drop before start I always open new intance of Google Chrome and it works. Otherwise it's always inactive.

    Very often debug is not working and I need to restart it to make it work.

    Friday, April 29, 2011 6:26 AM
  • I have exactly the same problem when I run Visual Studio as an administrator. After disabling the "Run as administrator" for Visual Studio, problem solved.

    Friday, October 19, 2012 8:00 PM