When SQLMap misses an injection you’re sure is there, or crashes with unclear output, four debugging tools cover almost every case.

--parse-errors — Surface DBMS Errors

Prints raw DBMS error strings SQLMap sees. Fastest way to confirm the DBMS and understand why a payload failed.

sqlmap -u "http://target/vuln.php?id=1" --parse-errors

Sample output:

[WARNING] parsed DBMS error message: 'SQLSTATE[42000]: Syntax error or access
violation: 1064 You have an error in your SQL syntax...'
[INFO] heuristic (basic) test shows that GET parameter 'id' might be injectable
(possible DBMS: 'MySQL')

-t — Dump All Traffic to a File

Writes every request and every response (headers + body) to a flat file for review.

sqlmap -u "http://target/vuln.php?id=1" --batch -t /tmp/traffic.txt
less /tmp/traffic.txt

Each entry is a paired HTTP request [#N] / HTTP response [#N] block — read it when something looks off.

-v 6 — Max Verbosity

Same data as -t but live in the terminal, plus internal [DEBUG] steps (timeout setup, hostname resolution, UA negotiation, etc.).

sqlmap -u "http://target/vuln.php?id=1" -v 6 --batch

Verbosity ranges 0 (quiet) → 6 (everything). Use -v 3 for payload-level detail without full HTTP bodies.

--proxy — Pipe Through Burp

The gold standard. All SQLMap traffic becomes inspectable, repeatable, and modifiable in Burp.

sqlmap -u "http://target/vuln.php?id=1" --proxy="http://127.0.0.1:8080"
sqlmap -r request.txt --proxy="http://127.0.0.1:8080" --batch

Chain Burp + max verbosity

--proxy="http://127.0.0.1:8080" -v 3 gives you Burp’s request history AND SQLMap’s internal reasoning side-by-side.

Quick Reference

FlagPurposeOutput
--parse-errorsAuto-print DBMS syntax errorsTerminal inline
-t <file>Full traffic logFile
-v 6Max verbosity + debugTerminal live
--proxy=<url>Route through Burp/MITMExternal proxy

Common Hangs & Fixes

# Stuck on a cached false negative
--flush-session
 
# Target is slow / high-latency
--timeout=30 --retries=5
 
# Rate-limited / 429ing
--delay=1                       # seconds between requests
--safe-url="http://target/health" --safe-freq=3   # ping safe URL every 3 injection requests
 
# "Unable to connect to the target URL"
--force-ssl                     # request captured from HTTPS but -r doesn't know
--check-internet                # confirm sqlmap itself has connectivity
 
# TLS errors with a Burp CA
export REQUESTS_CA_BUNDLE=/path/to/burp-ca.pem
 
# Too many redirects
--ignore-redirects
 
# Lost auth mid-scan
--cookie="PHPSESSID=..."        # refresh with a current session
--load-cookies=cookies.txt      # Netscape format cookie jar

Session cache is sticky

SQLMap remembers injection points in ~/.sqlmap/output/<target>/session.sqlite and will skip redetection on the next run. If the target changed, or you’re chasing a false negative, pass --flush-session — otherwise you’ll keep seeing the old (stale) result.