Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How can I fix "The Breakpoint will not currently be hit......"

How can I fix "The Breakpoint will not currently be hit......"

Scheduled Pinned Locked Moved C#
questiondebugginghelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Khoramdin
    wrote on last edited by
    #1

    Hello everyone, I am working on a Browser Helper Object (BHO) and have created a Class Library with the following code. using System; using System.Collections.Generic; using System.Text; using SHDocVw; using mshtml; using System.IO; using Microsoft.Win32; using System.Runtime.InteropServices; namespace WebWatcher { [ComVisible(true), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352")] public interface IObjectWithSite { [PreserveSig] int SetSite([MarshalAs(UnmanagedType.IUnknown)]object site); [PreserveSig] int GetSite(ref Guid guid, out IntPtr ppvSite); } [ ComVisible(true), Guid("8a194578-81ea-4850-9911-13ba2d71efbd"), ClassInterface(ClassInterfaceType.None) ] public class BHO : IObjectWithSite { WebBrowser webBrowser; HTMLDocument document; public void OnDocumentComplete(object pDisp, ref object URL) { document = (HTMLDocument)webBrowser.Document; foreach (IHTMLInputElement tempElement in document.getElementsByTagName("INPUT")) { System.Windows.Forms.MessageBox.Show(tempElement.name != null ? tempElement.name : "it sucks, no name, try id" + ((IHTMLElement)tempElement).id); } } public void OnBeforeNavigate2(object pDisp, ref object URL, ref object Flags, ref object TargetFrameName, ref object PostData, ref object Headers, ref bool Cancel) { document = (HTMLDocument)webBrowser.Document; foreach (IHTMLInputElement tempElement in document.getElementsByTagName("INPUT")) { if (tempElement.type.ToLower() == "password") { System.Windows.Forms.MessageBox.Show(tempElement.value); } } } #region WebWatcher Internal Functions public int SetSite(object site) { if (site != null) { webBrowser = (WebBrowser)site; webBrowser.DocumentComplete += new DWebBrowserEvents2_DocumentCompleteEventHandler(this.OnDocumentComplete); webBrowser.BeforeNavigate2 += new DWebBrowserEvents2_BeforeNavigate2EventHandler(this.OnBeforeNavigate2); } else { webBrowser.DocumentComplete -= new DWebBrowserEvents2_DocumentCompleteEventHandler(this.O

    J 1 Reply Last reply
    0
    • K Khoramdin

      Hello everyone, I am working on a Browser Helper Object (BHO) and have created a Class Library with the following code. using System; using System.Collections.Generic; using System.Text; using SHDocVw; using mshtml; using System.IO; using Microsoft.Win32; using System.Runtime.InteropServices; namespace WebWatcher { [ComVisible(true), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352")] public interface IObjectWithSite { [PreserveSig] int SetSite([MarshalAs(UnmanagedType.IUnknown)]object site); [PreserveSig] int GetSite(ref Guid guid, out IntPtr ppvSite); } [ ComVisible(true), Guid("8a194578-81ea-4850-9911-13ba2d71efbd"), ClassInterface(ClassInterfaceType.None) ] public class BHO : IObjectWithSite { WebBrowser webBrowser; HTMLDocument document; public void OnDocumentComplete(object pDisp, ref object URL) { document = (HTMLDocument)webBrowser.Document; foreach (IHTMLInputElement tempElement in document.getElementsByTagName("INPUT")) { System.Windows.Forms.MessageBox.Show(tempElement.name != null ? tempElement.name : "it sucks, no name, try id" + ((IHTMLElement)tempElement).id); } } public void OnBeforeNavigate2(object pDisp, ref object URL, ref object Flags, ref object TargetFrameName, ref object PostData, ref object Headers, ref bool Cancel) { document = (HTMLDocument)webBrowser.Document; foreach (IHTMLInputElement tempElement in document.getElementsByTagName("INPUT")) { if (tempElement.type.ToLower() == "password") { System.Windows.Forms.MessageBox.Show(tempElement.value); } } } #region WebWatcher Internal Functions public int SetSite(object site) { if (site != null) { webBrowser = (WebBrowser)site; webBrowser.DocumentComplete += new DWebBrowserEvents2_DocumentCompleteEventHandler(this.OnDocumentComplete); webBrowser.BeforeNavigate2 += new DWebBrowserEvents2_BeforeNavigate2EventHandler(this.OnBeforeNavigate2); } else { webBrowser.DocumentComplete -= new DWebBrowserEvents2_DocumentCompleteEventHandler(this.O

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      Couple things off the top of my head: have you hooked Visual Studio up to Microsoft's symbol store for IE? Have you tried attaching a debugger to IE itself?

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: The Lord Is So Good The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      K 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        Couple things off the top of my head: have you hooked Visual Studio up to Microsoft's symbol store for IE? Have you tried attaching a debugger to IE itself?

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: The Lord Is So Good The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        K Offline
        K Offline
        Khoramdin
        wrote on last edited by
        #3

        Hello Judah, Thanx for the reply. In order to debug the BHO code, i did the following. I typically have my IE home page set to about:blank . That way I can start up the browser as fast as possible and go where I need to. So, start up the first IE window. The from VS.NET, I use the Attach to Process item in the Debug menu to attach to iexplore.exe . Set breakpoints in my BHO. To break within the constructor. I hope I was able to explain how I run the debug. Thank you very much and have a great weekend. Khoramdin

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups