TROUBLESHOOTING.md•2.99 kB
# Troubleshooting Extension Not Loading
The extension is installed but not activating in VSCode. Let's diagnose this step by step.
## Check Extension Installation
```bash
# Verify extension is installed
code --list-extensions | grep mcp
# Should show: local.vscode-mcp-language-server
# Check extension directory
ls -la ~/.vscode/extensions/local.vscode-mcp-language-server-0.1.0/
# Should show: out/, node_modules/, package.json, README.md
```
## Check for Errors in VSCode
### Step 1: Open Developer Tools
1. Open VSCode
2. Press `Ctrl+Shift+P`
3. Type: `Developer: Toggle Developer Tools`
4. Press Enter
### Step 2: Check Console for Errors
In the Developer Tools window that opens:
1. Click the **Console** tab
2. Look for any red error messages mentioning "vscode-mcp" or "extension"
3. Take note of any error messages
### Step 3: Check Extension Host Output
1. In VSCode, go to View → Output
2. In the dropdown at the top-right of the Output panel, select **"Extension Host"**
3. Look for errors related to our extension
### Step 4: Check Running Extensions
1. Press `Ctrl+Shift+P`
2. Type: `Developer: Show Running Extensions`
3. Look for `vscode-mcp-language-server` in the list
- If it's there: Check its status
- If it's not there: Extension is not loading
## Common Issues
### Issue 1: Extension Not in Running Extensions List
**Possible Causes:**
- Activation event not triggering
- Syntax error in extension code
- Missing dependencies in node_modules
**Solution:**
Try loading it in development mode:
```bash
cd ~/source/vscode-mcp-language-server
code .
```
Then press `F5` to launch Extension Development Host.
### Issue 2: "Cannot find module 'ws'"
**Solution:**
Reinstall dependencies in the extension directory:
```bash
cd ~/.vscode/extensions/local.vscode-mcp-language-server-0.1.0/
npm install
```
### Issue 3: Port Already in Use
**Check:**
```bash
lsof -i :3100
```
**Solution:**
If port is in use, either:
1. Kill the process using it
2. Change port in settings: `vscodeMcpLs.port`
## Manual Activation Test
Let's test if the extension can activate manually:
1. Open VSCode Developer Tools (Ctrl+Shift+I)
2. Go to Console tab
3. Run this command:
```javascript
vscode.commands.executeCommand('vscodeMcpLs.showStatus')
```
If you get an error about command not found, the extension isn't registered.
## Alternative: Development Mode
Try running in development mode to see detailed errors:
```bash
cd ~/source/vscode-mcp-language-server
code .
```
1. Open `src/extension.ts` in the editor
2. Press `F5` (Start Debugging)
3. A new "Extension Development Host" window opens
4. Check the Debug Console in the original window for errors
5. In the new window, check if the extension loads
## Report Issues
If the extension still doesn't load, please provide:
1. Output from "Developer Tools" Console tab
2. Output from "Extension Host" output channel
3. Output from "Developer: Show Running Extensions"
4. Any error messages you see