Skip to main content
Home Forums Silverlight Programming Programming with .NET - General How to debug the javascript or vbscript source code?]
2 replies. Latest Post by sladapter on June 28, 2008.
(0)
tszzp
Member
8 points
23 Posts
06-28-2008 6:41 AM |
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.
robhouwe...
Contributor
3184 points
548 Posts
06-28-2008 6:54 AM |
You can set a breakpoint in the javascript and run debug mode (when using Visual Studio 2008)
sladapter
All-Star
17445 points
3,173 Posts
06-28-2008 9:02 AM |
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.