BUG: Can Set SQL Breakpoints on Invalid Lines Inside a Trigger

Last reviewed: May 21, 1997
Article ID: Q166110
The information in this article applies to:
  • Microsoft Visual C++, 32-bit Enterprise Edition, version 5.0

SYMPTOMS

While using the SQL Debugger to debug a Trigger, the debugger doesn't break on each breakpoint that you have set.

CAUSE

The SQL Debugger allows you to set breakpoints on any line of code inside a Trigger regardless of whether it is a valid line of code.

RESOLUTION

The breakpoints that the debugger skips are placed on invalid lines of code.

To avoid this issue, place breakpoints on valid debuggable lines of SQL code only.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

This bug only pertains to Triggers. While debugging a Stored Procedure, the debugger only allows you to set breakpoints on valid lines of code. If you try to set a breakpoint on an invalid line of code while debugging a stored procedure, the breakpoint is moved to the next valid debuggable line of SQL code.

When you are using a stored procedure and setting breakpoints before you start debugging, you can set breakpoints anywhere in the code including non- debuggable statements. However, as soon as you start debugging, you receive the following warning and breakpoints are moved:

   One or more breakpoints are not positioned on valid lines.
   These breakpoints have been moved to the next valid lines.

When you are using a trigger and setting breakpoints before you start debugging, you can set breakpoints anywhere in the code including non- debuggable statements. The warning listed above is not shown and invalid breakpoints are not removed during debugging.

Sample Code

   CREATE TRIGGER MyTrigger
   ON authors
   FOR DELETE
   AS

   /* Can set a breakpoint on the DECLARE line however since this isn't a
   valid debuggable line the debugger will skip over it and stop on the
   SELECT line */

      DECLARE  @charVar CHAR

      SELECT * FROM Authors
 

	
	


Keywords : kbtool vcbuglist500 VCEntIss VCEntSQLDebug kbbuglist
Version : 5.0
Platform : WINDOWS
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.