BUG: Can Set SQL Breakpoints on Invalid Lines Inside a TriggerLast reviewed: May 21, 1997Article ID: Q166110 |
The information in this article applies to:
SYMPTOMSWhile using the SQL Debugger to debug a Trigger, the debugger doesn't break on each breakpoint that you have set.
CAUSEThe 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.
RESOLUTIONThe 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.
STATUSMicrosoft 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 INFORMATIONThis 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |