Is there an IDE which lets me debug DOS batch scripts, setting breakpoints, examining variables and stepping through the script?
-
there is one for powershell. I think it's time to abandon batch– phuclvCommented Aug 9, 2018 at 11:28
-
I abandoned batch long ago :-) For Python. But, we still have some batch files which no one will convert, and I just lost a morning debugging one (and, nope, "they" won't let me spend a morning converting it)– MawgCommented Aug 9, 2018 at 11:45
-
2DOS and .bat files under Windows are very different things.– AlejandroCommented Aug 9, 2018 at 13:56
-
Very, very true (+1). In this case, I mean batch files in Windows. I don't often go near our DOS boxes.– MawgCommented Aug 9, 2018 at 14:13
1 Answer
JP Software has 2 different products for batch debugging
Take Command
... In addition, Take Command is a powerful batch file programming tool, including an integrated IDE with a sophisticated editor and batch debugger. Take Command offers extensions such as DO loops, SWITCH statements, error and exception handling, system monitoring and event triggers, third-party plugins, and more than 690 built-in variables and functions.
- Take Command combines the power of the command line with the ease of use of Explorer. You can manipulate files in the tabbed command prompt windows and graphically see the results.
- Take Command is compatible with your existing Windows command prompt commands and CMD batch files, while adding thousands of new features. (And Take Command runs your CMD batch files faster than CMD!)
- The integrated and familiar environment means you are immediately more productive with your interactive command prompt and batch file programming tasks.
- The consistent command prompt commands syntax reduces your learning and development time.
- The comprehensive help (including context-sensitive popup help for command line commands syntax), speeds your development time and reduces syntax errors.
- Create and debug your batch scripts in a fraction of the time with the integrated editor and batch file debugger.
- It's fast - 20-200% faster at displaying output than the standard CMD command prompt.
- Take Command is fully customizable, including multiple themes, colors, menus, toolbars, and windows.
- You can redefine your commands through aliasing, create new commands and functions for your regular tasks, and assign frequently used commands to a single keystroke.
- The user interface is available in English, French, German, Italian, Russian, and Spanish. (Online help is currently in English only.)
You can see the demonstration video here
CMDebug
CMDebug is a stand-alone version of the Take Command IDE and batch debugger component. CMDebug is intended for developers who need to develop batch files to run in CMD (the Windows default command processor) or TCC-RT (the free runtime version of TCC).
CMDebug allows you to create and debug your batch scripts with the integrated graphical IDE. CMDebug includes tabbed edit windows and a sophisticated debugger with single stepping, breakpoints, syntax coloring, tooltips, bookmarks, and tabbed variable and watch windows. Windows batch file programming has never been easier or more powerful!
Unfortunately they're not free. You can try them for 30 days though
There's also Running Steps from Stepping Sofware
Running Steps: Because batch file debugging is not easy, you need a tool that will help you pinpoint the source of the bugs quickly. Are your files stopping with a message like 'xyz was unexpected at this time'? Are you spending tens of minutes (even hours) finding and fixing bugs? You don't need to. With 'Running Steps' you will make your batch files more robust and remove bugs in just a fraction of the time. Plus, it will warn you about lines that are prone to fail even if they execute fine on a regular basis. Reasonably priced. Just $79.99.
- Project oriented architecture.
- Integrated code analyzer to check your code as you type it.
- Visual Studio-like debugging environment.
- Rich set of debugging commands (step into, step over, step out, and more)
- Rich Project analyzer to find your errors and warnings in no time.
- Integrated support for delayed-expanded environment variables.
- Multi-type breakpoint definitions to fit your multiple debugging needs.
- Complex pipeline and redirection support with multi-color highlighting.
- Environment variable visualization and modification support.
- Expanded information window for true variable definition visualization.
- Impressive 'For command' unrolling feature.
- Interactive callstack and Parameters window.
- State of the art editor.
- Integrated command output window.
- Simple intuitive interface. Extremely easy to learn and use.
- Customizable options and settings.
- Runs in x86 and x64 processor architecture machines.
Sadly the company seems went out of business but you can still download the installer from archive. Like Take Command, it's a 30-day trial software but you can't buy the license anymore