How to? debug a nested batch file

Sep 5, 2012
2
0
I have a batch file, that calls another batch file, as follows:
...
set my_path=%~dp0%
cd /D %my_path%
call remove\remove.bat
...

I cannot step into(F11) the called batch.
If replace the string
call remove\remove.bat with
call c:\tt\tada\remove\remove.bat it works fine.
My batch file works fine executed in a cmd-shell but not in the Take debugger IDE.
I understand it has something to do with path settings, but what and how?
My demands is that it has to be a relative path because the top folder (containing several more batch files and other calls) can be put anywhere.
How do set up the tool to handle this path problem
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
The batch debugger will start a new shell where it executes the batch files. If you want to set up specific paths, you'll need to put them in your TCSTART, which the IDE will execute when the IDE initializes (not when each batch file runs).

Depending on how you start it, the IDE will inherit either from the TCC environment (BDEBUGGER), or the Take Command environment (if started with the Edit/Debug button).
 
Sep 5, 2012
2
0
The batch debugger will start a new shell where it executes the batch files. If you want to set up specific paths, you'll need to put them in your TCSTART, which the IDE will execute when the IDE initializes (not when each batch file runs).

Depending on how you start it, the IDE will inherit either from the TCC environment (BDEBUGGER), or the Take Command environment (if started with the Edit/Debug button).

Robert says:
I don't understand?
Do I have to do something, in Take, I don't have to do when executing in the windows cmd window?
The call to --call remove\remove.bat with is ok in cmd but not in the Take debugger (and yes I start with the Edit/Debug button).
In my original batch file the call to remove.bat is followed by 10 other calls to other batch files which in it's turn has calls to other batch files. All with relative paths and all in separate directories.

What do I do to make this work in the Take debugger??
Please give me an answer with an example.
We are testing different batch debuggers and the one that suits us we will buy. So far this tool is not working as we expect to.
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Debug messages from TEE? Support 3
T Fixed Unnecessary debug output Support 3
J How to? Debug Keyboard Shortcuts (Ctrl-A not remapping?) Support 8
D I need a debug-plan Support 4
T Debug build of textpipeengine.dll ? Support 1
S Debug feature bug? Support 17
O Is the bdebugger supposed to debug? Support 1
vefatica Help from IDE fails after a non-debug run Support 5
A Debug popup Support 1
B Keys in debug menu not working in bdebugger Support 1
H Edit/Debug menu item with alternate INI files Support 0
B Problem with color in nested shells Support 1
R Problem with %_do_loop in nested do loops Support 2
C Nested IF syntax — TCC behaving differently to CMD Support 12
C FOR loop with nested IF / IFF Support 9
jbanaszczyk Broken For and nested Do Support 2
vefatica _DO_LOOP and nested DOs? Support 8
vefatica WAD Nested variable expansion in PDIR's @function[*]? Support 13
vefatica Single-line DO inside nested multi-line DOs? Support 9
G WAD Nested if exits enclosing if Support 3
M A problem with nested Gosub's/ExecStr's Support 14
C CMD's "nested quote" syntax Support 3
dcantor Terminology question: nested vs. recursive Support 0
R nested for loop question Support 3
J Nested for loops and quotes Support 12
D can PDIR list full filepaths of docs in a nested folder? Support 13
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
Joe Caverly "Functions" in cmd.exe batch files Support 6
S Batch files Calling Batch Files Support 2
P exit /b in batch files Support 7
P Labels in batch files: TCC vs CMD.exe Support 9
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
J New lexer for TCC batch files. Support 0
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

Similar threads