IE8 and VS2008: How do I disable script debugging?

2019-03-26 11:21发布

IE8 is out and apparently it automatically turns on script (JavaScript) debugging whenever you launch your project in debugging mode. Does anyone know how to turn this ofF? I scoured the IE8/VS2008 settings but didn't see anything.

Edit: You can't just go into Internet Options and disable debugging: http://blogs.msdn.com/webdevtools/archive/2008/03/05/jscript-debugging-made-easy-with-ie8.aspx This is so you can leave debugging off for regular web browsing, but have it automatically come on when debugging. I want script debugging off for good.

THE REAL ANSWER: Even though someone already won the bounty, they didn't really answer the question. I went straight to the source (Microsoft) and ended up getting a blog post with some workarounds here. Sweet!

8条回答
欢心
2楼-- · 2019-03-26 11:51

It's annoying, but you can do this per session:

  1. Start debugging your website, F5
  2. In the top menu, go to Debug;Windows;Processes
  3. In my Processes window, there are two processes, one for IExplore:script and one for WebDev.WebServer.EXE:Managed. Right-click the IExplore:script lineitem and select Detach Process.

UPDATE

The link that Nicholas provided explains that installing the Silverlight SDK and then enabling Silverlight debugging for your web project (a checkbox on the bottom of the "Web" tab in the property pages) will prevent the script debugger from attaching to the IE process. Basically, you can't debug both at the same time, and the Silverlight option takes precedence. The link also provides several registry tweaks to partially or fully disable script debugging.

I started using the Silverlight workaround technique after I posted this answer, so I was coming back to update it when I saw that the OP found the same solution. Since this answer was accepted and awarded a bounty but didn't really answer the question, I hope this update gives the answer a tiny bit more merit.

查看更多
混吃等死
3楼-- · 2019-03-26 11:51

When I detach the the iexplore.exe process as described in the "per session" solution above it also detaches the aspnet_wp.exe process and dumps me out of debug.

The Options | Advanced | Disable Script Debugging" also does not work. Here's why: http://blogs.msdn.com/webdevtools/archive/2008/03/05/jscript-debugging-made-easy-with-ie8.aspx

Apparently VS2008 turns it on for you, regardless of the Advanced setting in IE8.

The only work around I have found for this is to start the IE8 session first (such as with "View in Browser" from the Solution Explorer) and then choose Debug | Attach to Process in VS2008 and attach to the aspnet_wp.exe process.

查看更多
登录 后发表回答