Page view counter
How to debug the javascript or vbscript source code?]
Last post 06-28-2008 9:02 AM by sladapter. 2 replies.
Sort Posts:
06-28-2008 6:41 AM
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.

 

tszzp

Loading...
Joined on 06-17-2008
Posts 23
06-28-2008 6:54 AM
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. Thank you!)

Kind Regards,
Rob Houweling

Visit my blog at http://web-snippets.blogspot.com

robhouweling

Loading...
Joined on 03-01-2008
Ede (the Netherlands)
Posts 397
06-28-2008 9:02 AM
Marked as Answer
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

sladapter

Loading...
Joined on 03-05-2008
Indiana, US
Posts 2,689
Microsoft Communities