VSCode Launch Configuration UI
A Visual Studio Code extension that provides an intuitive user interface for managing launch configuration arguments. Easily enable, disable, and toggle command line arguments in your launch.json
files through a dedicated sidebar panel with checkbox controls.
✨ Features
- Dedicated Activity Bar Icon: Access your launch configurations through a custom sidebar panel
- Tree View Display: Hierarchical view of all launch configurations and their arguments
- Always Accessible: Available whenever you have a workspace open
☑️ Interactive Argument Management
- Checkbox Controls: Toggle arguments on/off with simple checkbox clicks
- Comment-Based Toggling: Arguments are enabled/disabled by commenting/uncommenting them in the JSON
- Real-time Updates: Changes are immediately reflected in both the UI and the
launch.json
file
- State Persistence: Checkbox states are remembered during your editing session
📝 Smart JSON Parsing
- Comment Support: Parses both active arguments and commented-out arguments from
launch.json
- Maintains JSON Validity: Uses
//
comments to disable arguments while keeping valid JSON structure
- Automatic Detection: Scans your
.vscode/launch.json
file and displays all configurations
🔄 Live Synchronization
- Bidirectional Sync: UI reflects current state of
launch.json
and updates the file when changed
- Refresh Capability: Manual refresh button to reload configurations
- Error Handling: Graceful handling of missing or invalid launch configuration files
🚀 Getting Started
Installation
- Install the extension from the VSCode Marketplace
- Open a workspace that contains a
.vscode/launch.json
file
- Look for the new debug icon in the Activity Bar (left sidebar)
Basic Usage
- Open the Panel: Click the debug icon in the Activity Bar to open the "Launch Configurations" panel
- Expand Configurations: Click the arrow next to any configuration name to see its arguments
- Toggle Arguments: Check/uncheck boxes next to arguments to enable/disable them
- See Changes: Arguments are automatically commented/uncommented in your
launch.json
file
📋 Requirements
- VS Code: Version 1.103.0 or higher
- Workspace: Must have a
.vscode/launch.json
file in your workspace
- Node.js: Required for extension runtime (typically bundled with VS Code)
⚙️ Extension Settings
This extension contributes the following settings:
launchConfigurationUI.groupArguments
: Enable/disable grouping of arguments by type (default: true
)
📖 Usage Examples
Example 1: Basic Argument Toggling
{
"configurations": [
{
"name": "Debug App",
"type": "node",
"args": [
"--verbose",
// "--debug-mode", // This argument is disabled
"--port=3000"
]
}
]
}
In the UI, you'll see:
- ☑️
--verbose
(checked/enabled)
- ☐
--debug-mode
(unchecked/disabled)
- ☑️
--port=3000
(checked/enabled)
Example 2: Multiple Configurations
The extension automatically detects and displays all launch configurations:
- Each configuration appears as an expandable item
- Arguments are grouped under their respective configuration
- Toggle states are maintained independently for each configuration
🛠️ Commands
Command |
Description |
Launch Configurations: Refresh |
Manually refresh the launch configurations view |
🔧 Technical Details
How It Works
- File Parsing: The extension reads your
launch.json
file and parses both active and commented arguments
- UI Generation: Creates a tree view with checkboxes representing the state of each argument
- State Management: Tracks which arguments are enabled/disabled through comment status
- File Updates: When you toggle checkboxes, the extension adds or removes
//
comments in the JSON file
Supported Argument Types
- Command Line Arguments: Items in the
args
array
- Environment Variables: Items in the
env
object
- Program Settings: Properties like
program
, cwd
, console
File Structure
The extension expects your launch configuration to be located at:
your-workspace/
├── .vscode/
│ └── launch.json
└── ...
🐛 Troubleshooting
Common Issues
"No launch.json found"
- Ensure you have a
.vscode/launch.json
file in your workspace root
- Check that your workspace folder is properly opened in VS Code
Arguments not showing up
- Verify your
launch.json
has valid JSON syntax
- Use the refresh button to reload the configurations
- Check that arguments are properly formatted in the
args
array
Checkboxes not responding
- Ensure the
launch.json
file is not read-only
- Check VS Code's output panel for any error messages
- Try refreshing the view using the refresh button
The extension logs debug information to the VS Code output panel. To view:
- Open View → Output
- Select "Launch Configuration UI" from the dropdown
- Look for any error messages or warnings
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Setup
- Clone the repository
- Run
npm install
to install dependencies
- Press
F5
to launch the extension in a new Extension Development Host window
- Make your changes and test them
📄 License
This extension is licensed under the MIT License.
🔗 Links
📝 Changelog
0.0.1
- Initial release
- Basic sidebar integration with Activity Bar icon
- Tree view display of launch configurations
- Checkbox-based argument toggling
- Comment-based enable/disable functionality
- Real-time synchronization with launch.json files
Happy debugging! 🐛✨