MapAperture
Workflows

cmd debug your Windows batch scripts

03
Fix batch script

Run a failing batch script

You have a batch script that fails silently. You need to see the exact command that broke and why. This workflow shows how to use the agent to run the script and capture the error output directly, because simple coding tasks turn into debugging sessions.

01

Open folder

Open the project folder in the agent chat window.

02

Run script

Ask the agent to run the batch script file.

03

Read output

Check the shell output card for the error message.

04

Fix error

Accept the proposed fix in the diff view (in Ask first mode).

Bug report example

bug-report.txt
# Title: Script fails silently
Summary: Script exits with error 1.
Expected: Script completes successfully.
Actual: Script exits with error 1.
Steps: Run script.bat in CMD.
Error message: Placeholder error text here.
Suspected cause: Missing file path.
Next check: Verify file path exists.

This plain text file records the bug summary and the steps to reproduce the issue for the agent to analyze.

Debug diagnostic tool for scripts

Run and capture

The agent runs your batch script in the Shell environment and captures the standard output along with the error stream for detailed analysis and review. You see the result. This approach acts like a cmd debug for your scripts. The agent reads the script file to understand the logic. It then executes the commands in sequence on the local machine. You can see exactly which line caused the failure in the log. The agent suggests a fix based on the real exit code. You can debug linux remotely by using SSH access to the server for execution.

Fix and verify

The agent proposes a change to the script file and you see the diff in the chat interface before accepting it, so you can verify the result. Ask first pauses. You read the proposed fix carefully before accepting it to ensure correctness. The agent uses edit_file to apply the change and saves the file. You then run the script again to verify the fix. This workflow applies to scripts you wrote or may change. cmd debug and debug diagnostic tool help you track these steps. ai tool to analyze codebase and debug simplifies the process.

MapAperture for Windows

Start debugging today

Download MapAperture ↗