开发者

Dropdown is staying on the screen when I hit breakpoints in JavaScript files. Why?

开发者 https://www.devze.com 2023-01-01 14:25 出处:网络
I\'m using Visual Studio 2008 Professional Edition SP1 & IE8. When I hit a breakpoint in a JavaScript file that\'s triggered when an item in a dropdown is selected the dev environment takes focus,

I'm using Visual Studio 2008 Professional Edition SP1 & IE8. When I hit a breakpoint in a JavaScript file that's triggered when an item in a dropdown is selected the dev environment takes focus, but the dropdown list is still visible, hovering over the code. This makes it very u开发者_运维技巧nreadable! Does anyone have any idea what's causing this? Or how it can be fixed?


When you pause IE in the Javascript debugger, the entire process is paused.

Therefore, it cannot handle Windows messages and hide the dropdown (which is a topmost borderless window).

You can solve this by running the code (and pausing IE) after the dropdown is closed.
To do that, you can wrap your code in setTimeout(function() { ... }, 10);.
Note that that may change the behavior of the code.

The best solution is to get a second monitor and put IE on one monitor and the debugger in the other monitor.

Every developer should have (at least) two monitors.

0

精彩评论

暂无评论...
验证码 换一张
取 消