This happens when the process of the browser is not attached to visual studio. Follow the steps below to fix the problem.

  1. Run the project. Right click the project, from the context menu select Debug -> New Instance.
  2. In Visual Studio, go to Debug -> Attach to Process.
  3. In the Attach to Process window, select the browser process you want the Visual Studio debugger to attach. You can see the title of the page in Title column of the Available Process list. In my case, I select the iexplore.exe process with "Log On - Windows Internet Explorer" title. If you are using firefox, just look for firefox.exe process.

    Visual Studio - Attach to Process

  4. After selecting the process, click the Attach button.

After attaching the process you should be able to debug your application using breakpoint.