Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Debugger stopping after returning from called batch file

Jun
28
0
I have been using TC for about 4 years now and when I first started using it the debugger would only stop o breakpoints if you used the run until return command. Now it stops if a batch file is called and returns. I read this was an enhancement that was requested by users and there seems to be others that do not like this enhancement. In my case it makes the debugger much harder to use because I use it to debug a batch files that calls down many levels and has literally hundreds of call to batch file that occur at almost ever level. Since I got this enhancement I have to hit the continue to return button hundreds of times to debug the system of batch files.

Is there any way this can be turned off? A option that says only stop on breakpoints, or do not stop on return of batch return would make the system useable for me.

If not can I install and older version that does not do this? If so what would be the last version that did not do this.

Thanks!
 
Just to make sure I understand, using the debugger with this .btm results in the issue that you describe;
Code:
@setlocal
@echo off

Gosub Batch1
Gosub Batch2
Gosub Batch3
call Batch1.btm
::Debugger stops on the following line,
:: requiring Shift-F11 to continue.
endlocal
quit

:Batch1
type <<- endtext > Batch1.btm
@echo off
@setlocal
echo %_time Entering Batch2.btm
call batch2.btm
::Debugger stops on the following line,
:: requiring Shift-F11 to continue.
echo %_time Returning from Batch2.btm
endlocal
endtext
Return

:Batch2
type <<- endtext > Batch2.btm
@echo off
@setlocal
echo %_time Entering Batch3.btm
call batch3.btm
::Debugger stops on the following line,
:: requiring Shift-F11 to continue.
echo %_time Returning from Batch3.btm
endlocal
endtext
Return

:Batch3
type <<- endtext > Batch3.btm
@echo off
@setlocal
echo %_time Entering Batch4.btm
iff exist batch4.btm then
call batch4.btm
else
echo Could not find batch4.btm
echo %_time Returning from Batch4.btm
endlocal
endtext
Return

Is this the issue that you are having?

Joe
 
It would seem that this feature was introduced in Version 25.

From the help file;
If you "step out" (run to breakpoint or end) and you are in a CALL'd batch file, and if there are no more breakpoints in the current file, you will be returned to the parent batch file at the line following the CALL, and "step out" will be turned off.

This is my understanding, which I hope is correct.

Joe
 
Yes and that is a problem if you call a batch file that calls a batch file and that calls another batch file and you do not want any stops until you either hit another break point or return to the original batch file. So if you set a breakpoint on the next statement and before you reach it there are 50 calls to batch files that return you will have to hit continue 50 times to get to the breakpoint.

That is not workable when you have many calls in a system of nested batch files.
 
Definitely something that @rconn will have to address for you.

Joe
 

Similar threads

Back
Top