The first step is set Internet Explorer up for debugging. For background you should understand that add-ins within Expression Web run in a IE Web Control that Expression Web hosts. As with any web page (running in IE or an IE embedded Web Control) debugging is turned off from a Window installation. We will start with that as step 1.
1. Load Internet Explorer
2. Open IE Options
3. Click the Advanced Tab, locate the Browsing section and uncheck the 'Disable script debugging' checkboxes.
4. Click Apply, OK and close any and all IE instances, as well as all Expression Web instances.
With Visual Studio launched and SlapShot installed open SlapShot.html from your add-ins directory within VS:
1. In VS choose 'File Open -> File' and use %appdata% directy ala: %appdata%\Microsoft\Expression\Web 4\AddIns\SlapShot\SlapShot.html
2. Once open in VS find and place your cursor on line 30, then press F9 to insert a breakpoint:
3. Start Expression Web 4 (if SlapShot is open close it and restart Expression Web). Create a website, configure it to use the Dev Server, run any page one time in IE (F12).
4. Back in VS use Debug ->Attach to process, find expressionweb.exe and click it once:
5. Next click the 'select' button, choose the 'Debug these code types' radio and choose 'Script', uncheck all others
6. Click OK and then attach, back we go to expression Web 4, time to load SlapShot up.
7. Choose the Panels menu and choose SlapShot
8. You should cleanly break into Visual Studio at your breakpoint, hit F10 once and you will start to see your locals populate with data, your call stack window showing your stack (nice):
Some nice thoughts here are that you can inspect some of the less documented objects within the API:
Sweet, locals, watch, callstack, function eval and object inspection. Enjoy, any problems let me know!