Video summary

Работа с Debug панелью сервера на Yii2

Main summary

Key takeaways

Technology

What the video covers: Yii2 “Debug panel” on the server

The speaker demonstrates how to use Yii2’s debug panel to inspect and troubleshoot API requests/responses on a test server.

The debug panel is described as a tool that helps block/observe incoming requests to make debugging easier. It’s especially useful for:

  • Mobile app developers
    • Verify that requests arrive in the correct format
    • Check why expected server results aren’t returned
    • Ensure response parsing is correct
  • Server/API developers
    • See which API methods are called, with what parameters
    • Track request processing progress
  • Testers
    • Validate integration
    • Quickly locate mismatches

Key troubleshooting logic explained

  • If a request arrives with incorrect or missing parameters, the issue is likely on the mobile/client side.
  • If the request has correct parameters, but the response contains an error or empty/incorrect data, the issue may be on the server/API side.

Walkthrough: what you can inspect in the debug panel

1. Request activity (examples: GET-like “news list”)

The debug panel shows that a request came in to fetch a news list. You can identify the API method and compare it with documentation—the video emphasizes checking:

  • parameter definitions
  • expected response format

2. GET parameters and request details

The panel shows:

  • query parameters (e.g., an empty offset for “portion”-based pagination)
  • whether the request was made by an authorized user

3. Database/query logs

The panel includes logs for things like:

  • database connections
  • selection/validation of the authorized user
  • which tables are queried for news/publications
  • serialization of each returned news item

It also shows the actual data returned by the server (the response payload structure).

4. Replaying requests

The speaker notes that you can copy the request details and repeat it directly from the browser to see what the server returns.


Pagination / batch loading behavior shown

The debug panel can illustrate batched loading, for example:

  • one batch starts loading and returns elements
  • subsequent batch attempts may return zero elements, causing pagination/loading to pause

This helps verify that the client’s pagination logic matches the server behavior.


POST requests (sending data / editing profile)

The panel distinguishes:

  • GET requests for receiving lists/details
  • POST requests for sending data (e.g., editing a profile)

Example discussed:

  • An “edit profile” POST shows the server received updated profile fields in the POST body
  • The panel shows access token location, posted parameters, and logs server-side steps such as serialization, validations, updates, and potentially related user/document updates.

Important limitation noted

Some endpoints/methods:

  • may work only as POST (or only in a specific request type)

So trying to open/replay them as if they were GET from a browser may fail. Example: an endpoint can’t be called “like this” from a simple browser open; it requires POST.


Filtering and handling multiple simultaneous debug sessions

Debug panel usability can be impacted if other users/developers/testers are using it at the same time. The video explains using filters to isolate requests for the specific user/session performing the test.


Final guidance: where to look when debugging

Use the debug panel to determine whether the bug is:

  • in client request construction (wrong parameters/format), or
  • in server processing/response (correct request in, wrong response out)

It also mentions using the Yii2 debugger when you need deeper step-by-step logic inspection.


Main speakers / sources

  • Timur (referred to as the person whose debug setup/panel is being examined)
  • The video author/speaker (demonstrating the debug panel using a Yii2 test server)

Original video