简体   繁体   中英

Remote debug Script Code VS2010

Is it possible to remote debug script code with Visual Studio 2010?

I have a JavaScript issue which occurs only on IE6/IE7. I'm developing on Windows 7 (64-bit) so can only install IE6 and 7 as Virtual Machines.

I've setup remote debugging between my development machine and the Virtual Machine and can successfully attach to the IEXPLORE process but I cannot debug it as Script code.

In VS2010 from Debug | Attach to Process, when I try to Attach to the IEXPLORE process on the remote machine VS2010 listed it as x86 type (Script is not displayed). And when I press Select to select the Code Type the choices do NOT include the script option (only, Managed, Native, Silverlight, T-SQL, Workflow).

Thus, although the debugger is attached to the remote process, it is not debugging the script so my breakpoints do not hit.

I have enabled debugging in Internet Explorer on the Virtual Machine.

This page http://msdn.microsoft.com/en-us/library/bb385613.aspx suggests that remote debugging of Script code is possible. However I cannot get it up and running. Any ideas would be greatly appreciated.

Check out this project, which lets you run IE6, 7, 8, etc together:

http://www.my-debugbar.com/wiki/IETester/HomePage

It's not 100% perfect, but it's always worked for my purposes.

I had this problem until I discovered that script debugging was disabled in IE on the remote machine. I re-enabled it using this work around and "script" now appeared in the "Type" column when attaching to process on the remote machine.

Here's a trick that works with Visual Web Developer Express.

Open a local page in VS and start to debug it(or hit F5)
IE should popup and open this page.

Type in IE's address bar the url of the remote site.
Go to VS and you should see now a list of remote files in the Solution Explorer pane

Put a breakpoint in a remote file, where you want to stop it. And refresh the page in IE.
You should hit the breakpoint.

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