The debugger should automatically attach to the browser with Visual Studio 2012. You can use the debugger
keyword to halt at a certain point in the application or use the breakpoints
directly inside VS.
You can also detatch the default debugger in Visual Studio and use the Developer Tools which come pre loaded with Internet Explorer or FireBug etc.
To do this goto Visual Studio
-> Debug
-> Detatch All
and then click Start debugging in Internet Explorer
. You can then set breakpoints at this level.