Troubleshooting¶
Solutions to common issues and problems in XPyCode.
Connection Issues¶
Server Won't Start¶
Problem: python -m xpycode_master fails or exits immediately
Solutions:
- Check Python version:
python --version(must be 3.9+) - Verify installation:
pip show xpycode_master - Check for port conflicts: Try different port with
--port 8001 - Look for error messages in terminal
- Reinstall:
pip install --upgrade --force-reinstall xpycode_master
IDE Won't Connect¶
Problem: IDE not opening
Solutions:
- Verify server is running
- Check firewall isn't blocking Python
- kill and Restart the IDE via the Add-In
- Check WebSocket connection in console logs
Add-in Not Loading in Excel¶
Problem: XPyCode add-in doesn't appear in Excel
Solutions:
- Ensure the XPyCode server is running before opening Excel
- Check Home → Add-ins → More Add-ins → Shared Folder
- Click Refresh to reload the add-in list
- Verify manifest file location (check server logs):
- Windows:
%USERPROFILE%\.xpycode\manifest - macOS/Linux:
~/.xpycode/manifest - On non-Windows platforms, manually install the certificate from
~/.xpycode/certs - Add manifest path to Trust Center → Trusted Add-in Catalogs or use platform-specific sideloading methods recommended by Microsoft
- Restart Excel completely (close all workbooks)
- Re-register the add-in by restarting the XPyCode server
Code Execution Issues¶
Code Won't Run¶
Problem: Pressing F5 does nothing or shows errors
Solutions:
- Check for syntax errors (red underlines in editor)
- Kill and restart the Kernel (via IDE or Add-In)
- Check console for error messages
- Save the module first (Ctrl+S)
- Try closing and reopening the module tab
Import Errors¶
Problem: ModuleNotFoundError: No module named 'xxx'
Solutions:
- Install package via Package Manager
- Verify installation completed successfully
- Check package name spelling
- Restart kernel if needed
Code Runs But No Output¶
Problem: Code executes but console shows nothing
Solutions:
- Add
print()statements to verify execution - Check Console output level (should be "All")
- Verify code path is being reached
- Check if "Console Only IDE" filter is hiding output
Debugging Issues¶
Breakpoints Not Hitting¶
Problem: Debugger doesn't stop at breakpoints
Solutions:
- Verify using Debug (Shift+F5), not Run (F5)
- Ensure breakpoint is on executable line (not comments/blanks)
- Check if code path reaches the breakpoint
- Remove and re-add the breakpoint
- Restart debugging session
Variables Not Showing¶
Problem: Variables panel is empty during debugging
Solutions:
- Ensure execution is paused at a breakpoint
- Check if variables exist in current scope
- Step Into a function to see its local variables
Step Commands Not Working¶
Problem: F10/F11 don't advance execution
Solutions:
- Verify in active debug session
- Check if execution is paused (not running)
- Look for keyboard shortcut conflicts with other software
Function Publishing Issues¶
Function Not Appearing in Excel¶
Problem: Published function shows #NAME? error
Solutions:
- Verify function was published (check Function Publisher status)
- Click on "Sync to Excel"
- Close and reopen workbook
- Force Excel recalculation: Ctrl+Alt+F9
- Check console for publishing errors
Function Returns Wrong Results¶
Problem: Excel formula returns incorrect values
Solutions:
- Test function directly in IDE first
- Check dimension setting (Scalar/Array/Broadcast/Full)
- Verify type conversions (Python ↔ Excel)
- Add debug print statements
- Check for None/null values
Function is Slow¶
Problem: Excel formulas take long to calculate
Solutions:
- Optimize Python code (use numpy for arrays)
- Check if dimension is correct for use case
- Avoid expensive operations in scalar functions
- Cache results if appropriate
- Profile code to find bottlenecks
- Kill and Restart the Kernel
Package Management Issues¶
Package Installation Fails¶
Problem: Package Manager shows installation errors
Solutions:
- Check internet connection
- Try different PyPI mirror (see settings)
- Check package name and version exist
- Look for compilation errors (C extensions)
- Install dependencies manually if needed
Dependency Conflicts¶
Problem: Installing package breaks others
Solutions:
- Check version compatibility
- Use Package Manager to install compatible versions
- Consider using different workbooks for conflicting dependencies
Console Issues¶
Console Not Showing Output¶
Problem: print() statements don't appear
Solutions:
- Check output level setting (should be "COMPLETE" for nothing filtered)
- Verify code is executing (no errors)
- Disable "Console Only IDE" filter
- Check if console is cleared automatically
Console Text Corrupted¶
Problem: Garbled or missing characters
Solutions:
- Clear console and run again
- Check encoding settings
- Restart IDE if persistent (via the Add-In or use File → Exit)
Settings Issues¶
Settings Not Saving¶
Problem: Changes revert after closing
Solutions:
- Ensure clicking OK/Apply in settings dialog
- Check file permissions for config directory
- Verify settings file isn't read-only
Theme Not Applying¶
Problem: Theme change doesn't take effect
Solutions:
- Restart IDE after theme change
- Check theme files exist in resources
- Try default theme first
Performance Issues¶
IDE Slow or Laggy¶
Problem: UI is unresponsive
Solutions:
- Close unused workbooks
- Disable minimap in editor
- Reduce max console lines
- Close unused IDE panels
- Kill and Restart the IDE (via Add-IN or File → Exit)
- Check system resources (CPU, memory)
Large File Editing Slow¶
Problem: Editor lags with big files
Solutions:
- Split into smaller modules
- Disable unnecessary editor features
- Use code folding to collapse sections
Excel Integration Issues¶
Excel Formulas Not Recalculating¶
Problem: Function results don't update
Solutions:
- Force recalc: Ctrl+Alt+F9
- Check if calculation mode is Manual
- Re-publish function (Sync to Excel)
- Verify function code was saved
Excel Events Not Firing¶
Problem: Event handlers don't execute
Solutions:
- Verify handler is registered in Event Manager
- Check event name and target worksheet
- Look for errors in event handler code
- Add error handling to event function
- Check console for event-related errors
Clearing the Office Add-in Cache¶
If the add-in behaves unexpectedly after updates or mode switches, clearing the cache often helps:
Windows¶
- Close all Excel workbooks
- Navigate to:
%LOCALAPPDATA%\Microsoft\Office\16.0\Wef\ - Delete all contents of this folder
- Restart Excel
macOS¶
- Close all Excel workbooks
- Navigate to:
~/Library/Containers/com.microsoft.Excel/Data/Documents/wef/ - Delete all contents of this folder
- Restart Excel
After Clearing Cache¶
After clearing the cache:
- Start xpycode_master:
python -m xpycode_master - Open Excel
- Go to Add-ins → More Add-ins → Shared Folder
- Click Refresh if XPyCode doesn't appear
- Add XPyCode to your workbook
Network Issues¶
Behind Corporate Proxy¶
Problem: Can't access PyPI or external services
Solutions:
- Configure proxy in Settings Package Management
- Use internal PyPI mirror if available via Settings
- Download packages manually and use Python Paths
- Contact IT for proxy whitelist
SSL/Certificate Errors¶
Problem: SSL verification failures with messages like:
- SSL: CERTIFICATE_VERIFY_FAILED
- SSLError: [SSL] certificate verify failed
- unable to get local issuer certificate
Solutions:
- Manually install the self-signed certificate:
- Windows: Run the XPyCode server which automatically registers the certificate
- macOS/Linux: Import the certificate from
~/.xpycode/certsinto your system's certificate store - Verify the certificate is trusted by your system
- Restart Excel after installing the certificate
- If issues persist, check that the certificate hasn't expired
Getting More Help¶
Reporting Bugs¶
- Check if issue is already reported on GitHub Issues
- Include:
- XPyCode version
- Python version
- Excel version
- Operating system
- Steps to reproduce
- Error messages/logs
- Create minimal reproducible example
Community Support¶
- GitHub Issues
- Check documentation thoroughly first
- Search existing issues before creating new ones
Related¶
- Installation Guide - Setup help
- IDE Overview - Learn IDE features
- API Reference - Complete API documentation