🚀 Debug Syft nodes in VSCode
Description
Overview
This PR introduces the ability to debug Syft nodes using the VSCode debugger with the help of the debugpy library. The key changes include modifications to the server setup to enable debugging and the addition of a VSCode launch configuration to streamline the debugging process.
Usage
-
Start the Server in Debug Mode When launching a syft node, set the debug parameter to True. For example:
import syft as sy domain_node = sy.orchestra.launch(...other_params..., debug=True)Watch out for the debugpy listener's port number in the output logs.
-
Attach the VSCode Debugger Using the provided configuration in
.vscode/launch.json, it is very easy to attach VSCode Debugger to the node. Simply open the command palette (⌘ + ⇧ + P) and select Debug: Start Debugging. Then enter the debugpy listener port number provided in the output when prompted.