How to run code directly in the console?

I’m not really just starting but I never found how to do this basic task, so here goes…

Is there a way to run code directly in the Postman interface, like one can do it a browser Dev Tool pane? I need to do some quick manipulations with my environment variables and don’t want to create a fake request for it.

Hey @gabriel-r

I don’t think currently @postman has support for running script directly within the console but good thought team should take this as a product feature :stuck_out_tongue: . For now, only you can search and track your logs, warnings, and errors.

Still just for confirmation @neilstudd or @dannydainton can share their views.

Best,
Vikram

1 Like

No, that’s not currently something that is supported. I don’t think that it’s even something that would be supported any time soon. Feature requests are always welcome though. :trophy:

A browsers dev tools feature isn’t really a fair comparison, in my opinion, there’s a helluva lot more going on inside there :smiley:

2 Likes

Hi Danny
the whole dev tools with a kitchen sync would be overkill indeed, but a tiny field to run whatever “in the console” would be super useful. At least I think so, maybe it’s just me.
Thanks!

I don’t doubt it would be useful to some folks but the console, in the Postman context, is more of an output display source rather than a scripting environment.

I generally write code in pre-requisite scripts and point the request to localhost invalid url.

to check the output of script I use console.log();

In this way I am able to test code, before writing it to actual test scripts.

Hope this helps :slight_smile:

Using the Postman Echo service to make ‘dummy’ requests is another option:

https://www.postman.com/postman/workspace/published-postman-templates/collection/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65?ctx=documentation