A VS Code extension that allows you to quickly open the current file in Xcode and jump to the same line number where your cursor is positioned.
- 🚀 Quick Access: Open any file in Xcode with a single command
- 📍 Line Navigation: Automatically jumps to the current line number in Xcode
- 🎯 Context Menu: Right-click on any file in the editor to open it in Xcode
- ⚡ Lightweight: Simple and fast, no configuration needed
- macOS (Xcode command-line tools required)
- Xcode installed on your system
- The
xedcommand-line tool (included with Xcode)
- Open VS Code
- Go to the Extensions view (
Cmd+Shift+X) - Search for "Open File in Xcode"
- Click Install
Alternatively, you can install the .vsix file directly:
- Open the Command Palette (
Cmd+Shift+P) - Run "Extensions: Install from VSIX..."
- Select the
.vsixfile
- Open any file in VS Code
- Position your cursor on the line you want to jump to
- Open the Command Palette (
Cmd+Shift+P) - Type "Open File in Xcode (at line)"
- Press Enter
- Right-click anywhere in the editor
- Select "Open File at Line in Xcode" from the context menu
The file will open in Xcode and automatically navigate to the line where your cursor was positioned in VS Code.
This extension uses Xcode's command-line tool xed to open files. It:
- Captures the current file path and line number from VS Code
- Converts VS Code's zero-based line indexing to Xcode's one-based indexing
- Executes
xed --line <lineNumber> <filePath>to open the file in Xcode
If you encounter errors:
- "Failed to open file in Xcode": Make sure Xcode is installed and the
xedcommand is available in your PATH - Command not found: Run
xcode-select --installto install Xcode command-line tools - File doesn't open: Ensure the file path is valid and accessible
MIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.