The Postman Console is a powerful debugging tool that helps you inspect requests, responses, logs, errors, and scripts in real time. It is especially useful when working with APIs, automation, and test scripts.
Postman provides a built-in JavaScript console similar to browser developer tools. You can log values, inspect headers, and track execution flow using console.log().
// Log a simple message to the Postman Console
console.log("Request is about to be sent");
// Log environment and response values
console.log("Environment:", pm.environment.values.toObject());
console.log("Status Code:", pm.response.code);
The console displays logs showing environment variables and response status codes. This helps verify whether requests are behaving as expected.
Open the Postman Console using View → Show Postman Console. Below is a simulation of how the console looks when you send a request and log data.
console.log()