PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

🚀 Debug Syft nodes in VSCode

Open itstauq opened this issue 1 year ago • 0 comments

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

  1. 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.

  2. 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.

itstauq avatar Jun 30 '24 16:06 itstauq