You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, flwr apps are executed using the Flower CLI (flwr run), and due to the architecture, it is not possible to set breakpoints inside user-defined files (e.g., server_app.py or client_app.py) using the VSCode debugger. This makes it difficult to step through the code, inspect function calls, and understand the data flow without manually inserting pdb.set_trace() statements or relying on print/debug logs.
As a developer exploring and building on top of Flower, it would be extremely helpful to set breakpoints and debug using VSCode’s built-in tools. This would allow stepping through execution from initialization to training and aggregation phases, greatly enhancing understanding of the framework's inner workings.
Being able to inspect how strategy methods are called and how data is passed and transformed would improve development efficiency and help new contributors get up to speed quickly.
Planned Implementation
Introduce a --debug flag to the flwr run CLI command.
When this flag is provided, the Flower app should start in a way that enables Python debuggers (such as those in VSCode) to hit breakpoints set in user-defined files like server_app.py or client_app.py.
The debug mode should remove the need to manually insert pdb.set_trace() and support smooth integration with IDE debuggers.
Update the Flower documentation to include instructions for running flwr run --debug and attaching an IDE debugger like VSCode to step through the code.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Thanks for bringing this to GitHub Issues. It is something we are aware of, and need to carefully consider how to move forward, will talk with the team about this and update you asap.
Type
Feature
Description
Currently,
flwr
apps are executed using the Flower CLI (flwr run
), and due to the architecture, it is not possible to set breakpoints inside user-defined files (e.g.,server_app.py
orclient_app.py
) using the VSCode debugger. This makes it difficult to step through the code, inspect function calls, and understand the data flow without manually insertingpdb.set_trace()
statements or relying on print/debug logs.As a developer exploring and building on top of Flower, it would be extremely helpful to set breakpoints and debug using VSCode’s built-in tools. This would allow stepping through execution from initialization to training and aggregation phases, greatly enhancing understanding of the framework's inner workings.
Being able to inspect how strategy methods are called and how data is passed and transformed would improve development efficiency and help new contributors get up to speed quickly.
Planned Implementation
--debug
flag to theflwr run
CLI command.server_app.py
orclient_app.py
.pdb.set_trace()
and support smooth integration with IDE debuggers.flwr run --debug
and attaching an IDE debugger like VSCode to step through the code.Additional Context
No response
The text was updated successfully, but these errors were encountered: