Batch files Calling Batch Files

Jun 11, 2018
When I have a bat file call a bat file the calling bat file closes in the debugger when it calls into the called bat file and then comes back with the called bat file returns. Is there a way to have the calling bat file stay open until the called batch file returns?

Also if the debugging session is terminated you are left in the called batch file not returned to the original batch file.


Staff member
May 14, 2008
There currently is not a way to do that.

This is a complex issue - if you stop a batch debugging session, do you really want to go back to the original batch file? Or do you want to do something with the current batch file? Should the debugger open another tab for CALL'd batch files, or for chained batch files (or both or neither?).
Jun 11, 2018
I would suggest you keep the window open even if you terminate. I would behave like the Visual Studio Debugger. What is frustrating is the window opened when you started disappears and only comes back if you execute to the return to it.

Quite often I want to look back at the calling batch file while in the called batch file and it is a pain to reopen it especially when they are not in the same location.

And if you do reopen the window the batch file and the calling one returns you sometimes end up with it open twice.
Similar threads
Thread starter Title Forum Replies Date
J v10 GPF when calling complicated batch files Support 5
fpefpe How to? shortcuts and batch files Support 4
Joe Caverly "Functions" in cmd.exe batch files Support 6
P exit /b in batch files Support 7
P Labels in batch files: TCC vs CMD.exe Support 9
J New lexer for TCC batch files. Support 0
jadaml Echo unicode characters from UTF-8 Batch files? Support 1
J Files Disappearing During Batch Execution Support 4
nickles Fixed In batch files, %0 now evaluates to the absolute path Support 9
D Installation batch files Support 5
D Run all .CMD batch files with CMD.EXE Support 16
T Lua sharing data with batch files Support 2
CWBillow Setting and changing Vars in batch files Support 26
C How to? create a JPSoft BTM menu to run custom custom batch files Support 2
Charles Dye GPF in TCC 13.03.47 on batch files >= 2048 bytes Support 10
vefatica Command line DO in batch files Support 0
MBaas GUI-Tool for "File/Open" or tree (for use in batch-files) Support 3
CWBillow Switches for COPY in batch files when paused Support 6
vefatica `Back quotes` - command line vs. batch file Support 5
fpefpe How to? batch file size Support 2
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
M Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD Support 5
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
P Kill all other instances of tcc from a btm batch file Support 2
fpefpe batch file ending early Support 18
R Batch Debugger Command Expansion Window Support 3
K robocopy cancelling batch file processing Support 28
A Unable to pass batch file arguments unaltered Support 18
K Batch debugger not stepping correctly Support 4
S incorrect message at start Cancel batch job 4START.bat ? (Y/N/A) : Support 1
MickeyF Why does this batch file give me 'unknown command "else"' error? Support 17
vefatica Batch parameters broken? Support 2
cxxl Set encoding for batch file Support 4
dcantor How to? Batch file to be executed by TCSTART Support 4
T Fixed Problem with use of Batch parameters in the IDE Support 1
T Fixed IDE locks up if edit window for running batch is closed Support 6
T How to? Show the values of batch variables on the TCC screen Support 21
D Alias in batch file Support 3
TT's Help! Uninstalling TCC did not restore cmd.exe as Win10 default batch file processor. Support 4
vefatica Exit code of a batch file? Support 4
J cd command altered in batch file Support 3
MickeyF running a program from cmdline versus in batch file Support 1
B Batch file won't run if there is already an instance of TC 17 running Support 9
nickles Fixed Executing long command lines in a batch generates file name errors Support 16
T batch execution Support 9
rjperrella start /tabna leaves blank windows when running batch scripts Support 10
Jay Sage WAD Possible Bug in Batch Parameters Support 7
C How to? run a batch file in administrator mode while debugging in take command software Support 1
R Unexpected 'Cancel Batch Job' prompts Support 13
cgunhouse Fixed bdebugger with not exist batch file causes a crash Support 2

Similar threads