from locust import HttpUser, task
from locust.debug import run_single_user


class QuickstartUser(HttpUser):
    host = "http://localhost"

    @task
    def hello_world(self):
        with self.client.get("/hello", catch_response=True) as resp:
            pass  # maybe set a breakpoint here to analyze the resp object?


if __name__ == "__main__":  # launched directly, e.g. "python3 debugging.py", not "locust -f debugging.py"
    run_single_user(QuickstartUser)

from locust import HttpUser, task
from locust.debug import run_single_user


class QuickstartUser(HttpUser):
    host = "http://localhost"

    @task
    def hello_world(self):
        with self.client.get("/hello", catch_response=True) as resp:
            pass  # maybe set a breakpoint here to analyze the resp object?


if __name__ == "__main__":
    # launched directly, e.g. "python3 debugging.py", not "locust -f debugging.py"
    run_single_user(QuickstartUser)

comment update