Scenario:
“Internet Explorer F12 JavaScript debugger is great, but I use Visual Studio. I want to be able to set breakpoints in my JavaScript web resources which I author in Visual Studio, then hit F5 on the keyboard or Debug->Start Debugging from the menu or the Play Button on my toolbar just like I do with all other types of development in Visual Studio. Visual Studio should then launch the right CRM url, attach its JavaScript debugger, and my breakpoints should be hit.”
This is the #1 piece of feedback I hear from the customers/partners/ISVs with whom I work. I’ve always told people it’s not possible. I just realized how wrong I am. Given that I’ve used every version Visual Studio since it was first released, I am a little embarrassed to say I just had this “A HA!” moment. Better late than never.
As I mentioned in this post, I have stopped using the Developer Toolkit for Microsoft Dynamics CRM for web resource authoring in favor of the CRM 2011 Web Resource Linker/Publisher. Note, I still use the developer toolkit for plugin / workflow activity authoring. As I state in the post about the web resource linker tool, since it allows you to keep all of your web resources in a standard web project in VS, you get all the benefits of web project capabilities including other addons that work with web projects. It’s this premise which brought me to my “A HA!” moment. Below is a video walkthrough of getting this scenario working:
You can install the jQuery Code Snippets from:
http://visualstudiogallery.msdn.microsoft.com/577b9c03-71fb-417b-bcbb-94b6d3d326b8