Problem (from nuget PowerShell):
Status:
Currently I'm able from powershell (with $DTE object) to attach VS to IIS and IE9 tab process. However I'm not able to debug javascript code (I think VS by default debugs only .net code and not Script).
I saw EnvDTE80.Transport, but I don't know how to use it inside nuget PowerShell. Do you have any idea to debug js? Or a completely different approach to the problem?
Update (8 August): I'm able to attach to IE9 debugging js BUT I found that my problem is completely different:
BUT I attach the debugger to the processes too early and debugging doesn't work.
I haven't done this via the VS object model but via the GUI, when you attach to a running process like IE9, you can select which debugger type you want. In this case, you want the "Script" debugger. If this can be done by the GUI then I suspect that it can be done via the object model. The macro recorder in VS is good for figuring stuff like this out. I turned it on while I did the steps to attach via the GUI and got this:
Sub TemporaryMacro()
Try
Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger
Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default")
Dim dbgeng(1) As EnvDTE80.Engine
dbgeng(0) = trans.Engines.Item("Script")
Dim proc2 As EnvDTE80.Process2 = dbg2.GetProcesses(trans, "HILLR1").Item("iexplore.exe")
proc2.Attach2(dbgeng)
Catch ex As System.Exception
MsgBox(ex.Message)
End Try
End Sub
I use firebug to debug Javascript in Firefox. Chrome has its equivalent. Never tried in IE, but I think there is a Firebug version for IE.
Check this question: Firebug equivalent for Internet Explorer
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.