Network packet capturing is one of the essential skills that most developers must acquire. Whether writing web crawlers, performing API debugging, or analyzing bugs, one will inevitably encounter various packet capturing tools.
Currently, the most frequently used tools are Fiddler, Wireshark, and the renowned Charles. Of course, these tools have their pros and cons; however, their rich features can meet diverse network debugging scenarios, making them mainstream packet capturing tools in the market.
Proxyman
I recommend a relatively lesser-known but elegantly simple tool with an excellent UI design and flexible, easy-to-use functionality: Proxyman.
>
- Website: https://proxyman.io/
- As a well-known HTTP/HTTPS network debugging tool on Mac, Proxyman offers multiple request filtering, SSL proxy, breakpoint debugging, comment addition, and many other features. It also integrates several tools such as script execution and request change tracking.
- With numerous functionalities, it is highly effective in the field of network debugging, making it quite handy to use.
Letâs briefly introduce the specific features it possesses.
Multiple Condition Filtering
- When performing API debugging, you can narrow down the query range using the toolâs filtering attributes.
- By combining various filtering conditions such as URL, request header, response header, status code, comments, etc., you can precisely locate the query content.
- Moreover, you can save the filter settings for future use, reducing repetitive configurations.
>
Map Local File
- The name speaks for itself, mapping local files means using local JSON files to map onto request and response interfaces, including status code, headers, body, etc.
- From a development perspective, this undoubtedly enhances debugging efficiency, allowing comprehensive testing and covering various edge cases without waiting for server data updates.
Breakpoint Debugging
- This step is often needed during data packet capturing or front-end interface debugging. By setting breakpoints for network requests, you can intercept and modify request/response data (such as headers, URL, status codes) at specific points during request dispatch or response delivery, without altering client-side code.
Besides, functionalities such as JSON formatting, session saving, WebSocket debugging, network speed throttling, and regex matching are all available but will not be elaborated here. Interested users can try them out.
Tools for Keeping Your Computer Awake
Do you ever have the need where a program is running on your laptop, and itâs going to take a while to get results, but you donât want to wait? You want to just close your laptop and leave.
For Mac, it supports a native featureâclose the lid and go. However, once the lid is closed, it goes into sleep mode, and the program stops running. Although you can reopen the lid when you get home to resume, thatâs not what we want.
So, is there a way to keep a closed Mac from sleeping? This is similar for Windows; many might have the same need. Is there a solution?
- Yes!
- There is an app on Mac called Amphetamine, and the icon looks like this:
- Letâs take a look at some introduction images:
- The functionality introduction is quite clear, isnât it?
- The main feature is: prevent sleep! Prevent sleep! Prevent sleep!
- Simply search and install it from the App Store:
- After installation, a small icon will appear in the menu bar. Clicking on it opens a dropdown menu, as shown:
- Here you can create a new session, for instance, you can set it to indefinite, or set it for when a specific app is running or downloading files, which is very flexible.
- Usually, youâd choose indefinite, meaning it wonât sleep indefinitely. When you want it to sleep, you can manually turn it off or simply press the shortcut Command + I.
- Before activation, youâll see the line in the icon is horizontal, as shown:
- After activation, this line turns vertical, as shown:
- You might wonder, how to remember this? How to distinguish between horizontal and vertical for sleep prevention? What if you mix them up?
- Remember it this way: vertical means standing tall, steadfast, unyieldingâno sleep! Easy to remember, right?