[GH-ISSUE #959] Scripting - Add comments, highlight, etc. from scripting into the ProxymanApp #954

Open
opened 2026-03-03 19:23:19 +03:00 by kerem · 5 comments
Owner

Originally created by @rukano on GitHub (Aug 12, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/959

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version

2.31.0

macOS Version

macOS 11.4

Steps to reproduce

Using the wonderful scripting interface I can change the request and responses and log requests and additional info, but I can't interact with the actual Proxyman app, or the requests as represented in the Proxyman app, e.g. setting a comment or a highlight color.

Expected behavior

Is there a way to interact with Proxyman itself or the request (via the request ID) itself? I would like to be able to do something like:

context.proxyman.request.comment = "This request is failing on X conditions"
context.proxyman.request.highlight ="red"

It would be pretty nice for debugging without the console and especially when after the debug session one can save the session and have all this comments and states also saved, instead of having another log in the console and have to check out both separately.

This is probably more a feature request than an issue. But I've only found this way to ask about this.

Originally created by @rukano on GitHub (Aug 12, 2021). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/959 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version 2.31.0 ### macOS Version macOS 11.4 ### Steps to reproduce Using the wonderful scripting interface I can change the request and responses and log requests and additional info, but I can't interact with the actual Proxyman app, or the requests as represented in the Proxyman app, e.g. setting a comment or a highlight color. ### Expected behavior Is there a way to interact with Proxyman itself or the request (via the request ID) itself? I would like to be able to do something like: ```js context.proxyman.request.comment = "This request is failing on X conditions" context.proxyman.request.highlight ="red" ``` It would be pretty nice for debugging without the console and especially when after the debug session one can save the session and have all this comments and states also saved, instead of having another log in the console and have to check out both separately. This is probably more a feature request than an issue. But I've only found this way to ask about this.
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 12, 2021):

Thanks for your insight @rukano 👍

It totally makes sense to support comment and highlight color from the Scripting tool. Sometime I wish I can highlight with the red color for the response I modify by my Script 😄

I will bump this issue to our team and implement it in the next release. Will send you a BETA build soon 👍

<!-- gh-comment-id:897624915 --> @NghiaTranUIT commented on GitHub (Aug 12, 2021): Thanks for your insight @rukano 👍 It totally makes sense to support comment and highlight color from the Scripting tool. Sometime I wish I can highlight with the red color for the response I modify by my Script 😄 I will bump this issue to our team and implement it in the next release. Will send you a BETA build soon 👍
Author
Owner

@rukano commented on GitHub (Aug 12, 2021):

Wow! That's amazing! 😄 Thank you very much! Happy to test whatever it needs to be tested :)

<!-- gh-comment-id:897642665 --> @rukano commented on GitHub (Aug 12, 2021): Wow! That's amazing! 😄 Thank you very much! Happy to test whatever it needs to be tested :)
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 13, 2021):

Hey @rukano please check out this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.31.0_scripting_color_and_comment.dmg

You can simply set a comment or highlight with color:

function onRequest(context, url, request) {
    request.comment = "It's a Request"
    request.color = "red" // red, blue, yellow, purple, gray, green
    return request
}

// Or

function onResponse(context, url, request, response) {
    response.comment = "It's a Response"
    response.color = "yellow" // red, blue, yellow, purple, gray, green
    return response
}

Screen_Shot_2021-08-13_at_09_27_36

Document: https://docs.proxyman.io/scripting/snippet-code#comment-and-highlight-with-color

<!-- gh-comment-id:898132914 --> @NghiaTranUIT commented on GitHub (Aug 13, 2021): Hey @rukano please check out this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.31.0_scripting_color_and_comment.dmg You can simply set a comment or highlight with color: ```js function onRequest(context, url, request) { request.comment = "It's a Request" request.color = "red" // red, blue, yellow, purple, gray, green return request } // Or function onResponse(context, url, request, response) { response.comment = "It's a Response" response.color = "yellow" // red, blue, yellow, purple, gray, green return response } ``` ![Screen_Shot_2021-08-13_at_09_27_36](https://user-images.githubusercontent.com/5878421/129297097-3cc6d1e1-c5ec-4187-90bc-7f034eb7e326.png) Document: https://docs.proxyman.io/scripting/snippet-code#comment-and-highlight-with-color
Author
Owner

@rukano commented on GitHub (Aug 13, 2021):

Works like a charm @NghiaTranUIT ! 🥳

<!-- gh-comment-id:898410018 --> @rukano commented on GitHub (Aug 13, 2021): Works like a charm @NghiaTranUIT ! 🥳
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 13, 2021):

Awesome @rukano we will release this build soon 😄

<!-- gh-comment-id:898437550 --> @NghiaTranUIT commented on GitHub (Aug 13, 2021): Awesome @rukano we will release this build soon 😄
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#954
No description provided.