Debugger not stable

The debugger does not hang up immediately anymore, but stepping over simple ‘set’ statements with the local watch variables window open causes it to throw an ArgumentOutOfBounds exception. There may be other instabilities, but this is what I came across while testing.

SR Number:2245111 has been entered to address this issue.

Hi,Imolter.

I can’t reprocedure this issue. Would you like to post your procedure script and I will try to reprocedure it.

Thanks.

I simplified the offending procedure to be just a series of Declare and Set statements. Start the debugger, then turn on the local watches window. Now just F8 through each statement and it’ll eventually throw the error. Multiple developers here have confirmed it, so it’s not just me.

/****** Object: STOREDPROC [sp_debug_test] - Script Date: 8/30/2013 8:24:40 AM ******/

create procedure sp_debug_test( )

begin

declare xml_element exception for sqlstate value ‘99001’;

declare no_bills_to_process exception for sqlstate value ‘99004’;

declare no_output_file_path exception for sqlstate value ‘99005’;

declare @xml_temp xml;

declare @repricestack xml;

declare @xml_header xml;

declare @xml_trailer xml;

declare @xml_stack_open xml;

declare @xml_stack_close xml;

declare @errormessage long varchar;

declare @errorcode integer;

declare @sqlstate varchar(32767);

declare @bills_count integer;

declare @outfilepath long varchar;

declare @outfilename long varchar;

declare @fulloutfilename long varchar;

set @xml_header

= '<soap:Envelope xmlns:xsi="www.w3.org/…/XMLSchema-instance" xmlns:xsd="www.w3.org/…/XMLSchema" xmlns:soap="schemas.xmlsoap.org/.../">soap:Body<RepriceStack xmlns="secure.medrisk.net/…/">&

set @xml_trailer = ‘</soap:Body></soap:Envelope>’;

–*******************************************

– Document header and element

–*******************************************

set @repricestack = @xml_header;

–*******************************************

– element

–*******************************************

set @xml_stack_open = ‘’;

set @xml_stack_close = ‘’;

set @xml_temp = XMLELEMENT(‘testmode’,‘true’);

set @xml_temp = @xml_temp || XMLELEMENT(‘clientid’,‘1111’);

set @xml_temp = @xml_temp || XMLELEMENT(‘siteid’,‘2222’);

set @xml_temp = @xml_temp || XMLELEMENT(‘subclientid’,’’);

set @xml_temp = @xml_temp || XMLELEMENT(‘clientpassword’,‘xyzzy’);

set @xml_temp = @xml_temp || XMLELEMENT(‘resultcode’,0);

set @xml_temp = @xml_temp || XMLELEMENT(‘ignoreexhibits’,‘false’);

set @xml_temp = @xml_temp || XMLELEMENT(‘allowpendedbills’,‘false’);

set @repricestack = @repricestack || @xml_stack_open || @xml_temp;

– Output filename: MITCHELLSBI_yyyymmdd_hhnnss.XML

set @outfilename = ‘MITCHELLSBI_’ || convert(varchar, today(), 112) || ‘_’ || left(replace(convert(varchar, getdate(), 114), ‘:’, ‘’),6) || ‘.XML’;

set @fulloutfilename = @outfilepath || @outfilename;

end

GO

Definitely an interaction with the watch windows. If I debug without a local watches or watches window, it doesn’t blow up. Turn either of these on and boom.

Another thing I noticed is that when there are double-dash comment lines or blank lines (for readability), the debugger window gets confused and places breakpoint dots (in the left margin) on lines that are not valid statements. Since it’s counting the comments as statements, it leaves statements at the bottom of the procedure without any breakpoint dots. Can’t really explain this any better. But I have a suspicion that this statement mismatch may cause the ArgumentOutOfBounds exception to be thrown. We need to think outside the box a little here.

Ok.I can reproduce it . I have created issue report for further investigating it .

Thanks.

Yay! There’s light at the end of the tunnel! Thanks, Dexter.