1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? debug a nested batch file

Discussion in 'Support' started by Robert, Sep 6, 2012.

  1. Robert

    Joined:
    Sep 5, 2012
    Messages:
    2
    Likes Received:
    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
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,732
    Likes Received:
    81
    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).
     
  3. Robert

    Joined:
    Sep 5, 2012
    Messages:
    2
    Likes Received:
    0
    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.
     

Share This Page