Skip to content

feat: Add command to generate Metaflow debug configuration#10

Open
Sakshii-27 wants to merge 1 commit intoouterbounds:mainfrom
Sakshii-27:feature/generate-debug-config
Open

feat: Add command to generate Metaflow debug configuration#10
Sakshii-27 wants to merge 1 commit intoouterbounds:mainfrom
Sakshii-27:feature/generate-debug-config

Conversation

@Sakshii-27
Copy link
Copy Markdown

This PR addresses issue #6 by making it significantly easier for users to debug Metaflow steps directly within VS Code without needing to manually hunt down the correct launch.json configuration.

As mentioned in the issue, users often struggle with Metaflow debugging because they don't realize they need "subProcess": true and "args": ["run", "--max-workers", "1"].

To solve this smoothly, I implemented a two-part approach:

  1. Explicit Command (extension.generateDebugConfig): Adds a Metaflow: Generate Debug Config command to the palette. It intelligently checks for a .vscode/launch.json file in the workspace and safely pushes the perfect Metaflow Debug object to the configurations array.
  2. Native Tooling (DebugConfigurationProvider): Hooked into vscode.debug.registerDebugConfigurationProvider. If a user manually clicks "Add Configuration..." inside the native Run and Debug view, VS Code will proactively offer the "Metaflow Debug" template in their dropdown menu and dynamically inject the snippet.

Related Issues

Fixes #6

Testing

  • Tested locally using the Extension Development Host.
  • Confirmed that running Metaflow: Generate Debug Config correctly creates launch.json if it doesn't exist, and safely appends to configurations if it does.
  • Verified that "Metaflow Debug" shows up natively in the VS Code launch configuration dropdown.

Visual Proof

1. The Command Palette Option:
Screenshot 2026-02-28 at 9 31 01 PM

2. The Successfully Generated Configuration:
Screenshot 2026-02-28 at 9 31 40 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate debug launch configuration for a step

1 participant