Troubleshooting Shell Integration
Having issues with command execution in PS Smart Agent? This guide covers common problems and solutions.
Common Issues
Commands Not Executing
Symptoms:
- Commands hang or timeout
- No output displayed
- “Command failed” errors
Solutions:
- Enable Shell Integration
- Open VS Code settings
- Search for “terminal.integrated.shellIntegration.enabled”
- Set to
true
- Check Terminal Profile
{ "terminal.integrated.defaultProfile.windows": "PowerShell", "terminal.integrated.defaultProfile.linux": "bash", "terminal.integrated.defaultProfile.osx": "zsh" } - Restart VS Code
- After changing settings, restart VS Code
- Close all terminals and try again
Permission Denied
Symptoms:
- “Permission denied” errors
- Commands fail silently
Solutions:
- Check file permissions (Linux/macOS)
chmod +x your-script.sh - Run with appropriate permissions
- Use
sudowhen necessary - Or adjust user permissions
- Use
Command Timeout
Symptoms:
- Commands take too long
- Process appears stuck
Solutions:
- Increase timeout
- Settings > Terminal > Command Timeout
- Set to higher value (e.g., 300 seconds)
- Add to timeout allowlist
{ "ps.code.commandTimeoutAllowlist": [ "npm install", "pip install", "cargo build" ] }
Shell Not Found
Symptoms:
- “Shell not found” error
- Terminal doesn’t open
Solutions:
- Verify shell path
{ "terminal.integrated.profiles.windows": { "PowerShell": { "source": "PowerShell", "path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" } } } - Install missing shell
- Windows: PowerShell is included
- Linux:
sudo apt install bash - macOS: bash/zsh are included
VS Code Settings
Recommended Settings
{
"terminal.integrated.shellIntegration.enabled": true,
"terminal.integrated.shellIntegration.suggestEnabled": true,
"terminal.integrated.enableMultiLinePasteWarning": "never",
"ps.code.commandExecutionTimeout": 0
}
Debug Mode
Enable debug mode for more information:
- Settings > PS Smart Agent > Debug
- Check “Enable Debug Mode”
- View Output > PS Smart Agent
Still Having Issues?
- Check the Output panel: View → Output → PS Smart Agent
- Check Developer Tools: Help → Toggle Developer Tools → Console
- Visit pyshine.com for more tutorials and support
Learn more at pyshine.com