BUG: Breakpoints that are added by macros are not highlighted in the source editor (823240)



The information in this article applies to:

  • Microsoft Visual Basic .NET (2003)
  • Microsoft Visual Basic .NET (2002)

SYMPTOMS

In a Microsoft Visual Basic .NET project, you have a macro that sets a breakpoint in the source code. When you use the Macros IDE command to programmatically set a breakpoint in the source code of the macro, you may notice that the breakpoint is set in the source code but that the line is not highlighted. However, when you run the application, the application stops running at the breakpoint that was set by Macros IDE.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Start Microsoft Visual Studio .NET.
  2. On the File menu, point to New, and then click Project.
  3. Click Visual Basic Projects under Project Types, click Console Application under Templates, and then click OK.
  4. Replace the existing code with the following code for the Class1.vb class:
    Public Class Class1
       Sub Main()
          Dim x As Integer
          x = 5
          x = 6
       End Sub
    End Class
  5. On the Tools menu, point to Macros, and then click Macros IDE.
  6. In the projects explorer pane, expand MyMacros, and then double-click Module1.
  7. Replace the existing code with the following code:
    Imports EnvDTE
    Imports System.Diagnostics
    
    Public Module Module1
        Sub macro()
            Dim d As EnvDTE.Debugger = DTE.Debugger
            d.Breakpoints.Add("", "Class1.vb", 4, 1)
        End Sub
    End Module
  8. On the File menu, click Save MyMacros.
  9. On the File menu, click Close and Return to close MyMacros.
  10. On the Tools menu, point to Macros, and then click Macro Explorer.
  11. In the Macro Explorer, expand MyMacros.
  12. To run the application, click Start on the Debug. To stop running the application, click Stop Debugging on the Debug menu.
  13. In Macro Explorer, expand Module1.
  14. Right-click macro, and then click Run. You may notice that the breakpoint is set at line 4 in the source editor, but that the line is not highlighted.

REFERENCES

For additional information about managing macros in Visual Studio .NET, click the following article number to view the article in the Microsoft Knowledge Base:

317347 HOW TO: Create, Use, and Manage Macros in Visual Studio .NET


Modification Type:MinorLast Reviewed:2/3/2006
Keywords:kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbpending kbcode kbmacro kbide kbbug KB823240 kbAudDeveloper