Skip to main content

Microsoft Silverlight

Answered Question How to debug the javascript or vbscript source code?]RSS Feed

(0)

tszzp
tszzp

Member

Member

8 points

23 Posts

How to debug the javascript or vbscript source code?]

In Silverlight 2.0 Beta 2 Project, If I call the javascript function(then call vbscript function) in C# using Invoke method, how to debug the javascript

or vbscript source code? thanks.

 

robhouweling
robhouwe...

Contributor

Contributor

3184 points

548 Posts

Silverlight MVP

Re: How to debug the javascript or vbscript source code?]

You can set a breakpoint in the javascript and run debug mode (when using Visual Studio 2008)

(If this has answered your question, please click on mark as answer on this post)



Cheers!

Rob Houweling





My blog

sladapter
sladapter

All-Star

All-Star

17445 points

3,173 Posts

Answered Question

Re: How to debug the javascript or vbscript source code?]

I don't think you can debug Silverlight code and Script code at the same time. If you use F5 to start debug, the break point set in the JavaScript won't be hit. If you try to use Attach Process to debug and try to select both Script and Silverlight code you will get a message saying Silverlight Debugging is not compatable with Script.

If you want to debug JavaScript code you can try to use Attach Process and select Script debugger in the Attach To box.

When I try to debug Script code I usually just put a "debugger;" (this only works for IE) line in the JavaScript code where I want to set my break point and run my page by typing the page url in the browser. Then open a VS as debugger when that line get hit. Just remember to remove that "debugger" line when you are done.

 

 

 

 

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities