How to? debugging files that use CALL command - possible??

Jan 28, 2013
I started evaluating TakeCommand (batch debugger part), but can't get it working when one batch file calls another one:
call 2
- console shows me
TCC: C:\tst\1.bat [3]  Unknown command "2"
though 2.bat is in the same directory where the main batch file is.

i attached files for fast check - without TakeCommand , using pure windows command interpreter, it works as expected, calling 2.bat and returning back to main batch.

Is it possible to debug such batch files in TakeCommand?


  • 12.ZIP
    271 bytes · Views: 98


Staff member
May 14, 2008
Yes, you can CALL batch files from within the batch debugger. You can also single-step into them (if you use the step into and not the step over option).

However, the batch debugger isn't necessarily running in the same directory as the TCC session that invokes it, particularly if you have something in your TCSTART that is setting the default directory. (Not a very good idea if you're doing that for transient sessions!) If you put a CD or CDD at the beginning of your batch file to force the correct working directory, everything should work as expected.
Jan 28, 2013
thatks for reply, Rex. Actually i just want to debug my batch files on my PC, and all other use them without need to install TCC. And as CDD is not supported by windows command shell, this is not an option for me. I will try tomorrow with CD. But what arguments shall i give to CD to work inside TakeCommand debugger? And - how do i learn TakeCommand to automatically use directory of editing file as current? (at least RunningSteps and PrimalScript do that :) )


Staff member
May 14, 2008
You can either switch to the directory you want to use as the default before starting BDEBUGGER or IDE, or you can put a "CD /D drive:path" argument at the beginning of your batch files, which is supported in TCC and CMD. Probably a good idea anyway, unless you know that nobody is ever going to change directories before (or during) running a batch file.

The Take Command debugger doesn't automatically switch to the directory containing the batch file when debugging because:

1) The debugger allows editing multiple batch files through the tabbed interface, and it would be highly confusing to users for it to be (invisibly) switching to different directories.
2) Users frequently (probably even mostly) want to execute batch files from another directory (either explicitly or via the PATH). Changing to the directory containing the batch files could mean the batch file then couldn't find its files.
Similar threads
Thread starter Title Forum Replies Date
jdanielp Cannot step into and/or call another .bat file when debugging .bat file Support 2
T Is there a way to maintain the position in the environment list, while debugging? Support 10
Peter Murschall TCC V26.01.3x Debugging has problems with Alias /R Support 1
S Debugging Session Hang Support 7
Joe Caverly Debugging a LIBRARY function Support 10
I Change value of a variable while debugging Support 3
C How to? run a batch file in administrator mode while debugging in take command software Support 1
Mordachai Help! How to set parameters for script I'm debugging?! Support 6
Stefano Piccardi forum software writes debugging output Support 5
S V10 debugging problems Support 9
MickeyF TCC crashing when copying multiple files (now resolved) Support 6
fpefpe How to? shortcuts and batch files Support 4
C v28 key files Support 2
J ffind does not find files Support 4
C duplicate files in multiple plugin sites Support 9
Dmitry L. Kobyakov Fixed The SETARRAY /R command works incorrectly with cyrillic files Support 2
S How to? Deinstalling TC/reinstating execution of bat files by cmd in Win7 Support 31
vefatica FFIND, temp files? ... not deleted? Support 0
R FUNCTION to count NUMBER of files matching a pattern and specific length/not length Support 4
vefatica Tmp files from in-process pipes not deleted Support 6
vefatica Finding files with alternate data streams? Support 4
rps Multi-column DIR /v not displaying all files. Support 5
D How to skip files in a fileset? Support 6
vefatica PIPEVIEW leaves TMP files Support 18
K "copy /z /w" command not deleting read-only files in destination Support 10
Jesse Heines "Taken" date for JPG and PNG files Support 4
O I cannot use links to .btm files Support 5
C How to? rename files with spaces Support 8
R How to? Append files in multiple subfolders using copy? Support 8
Joe Caverly "Functions" in cmd.exe batch files Support 6
S Batch files Calling Batch Files Support 2
vefatica Find Files/Text dialog: does it work? Support 0
Joe Caverly UNZIPping older .ZIP files Support 3
C Documentation default location for LOG files Support 21
P exit /b in batch files Support 7
P Labels in batch files: TCC vs CMD.exe Support 9
M ANSI is used to show files instead of OEM in version 17 to 19 ! Support 5
C 7Z files on forum? Support 0
x13 Problem listing repository files using DIR http(s)://... Support 8
B Can copy command concatenate multiple mp3 files Support 2
redwdc Copying files with spaces, commas, etc. Support 5
J New lexer for TCC batch files. Support 0
M How to? want to download a file from a website enumarate the links and download the files Support 2
keithg1964 TCC RT Install Files Support 1
P Fixed Rexx .cmd files no longer work in TCC 20 Support 3
thorntonpg Handling files with embedded spaces Support 1
WavSlave Fixed Unable to sort files by description in TCC v19 Support 2
P Files older - exist Support 1
D safe delete files command Support 10
P Copying files in subdirectories Support 9

Similar threads