You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
github-actions[bot] edited this page Oct 31, 2025
·
1 revision
ElectronNET.Core transforms the debugging experience by providing native Visual Studio integration with multiple debugging modes. No more complex setup or manual process attachment—debugging now works as expected for .NET developers.
🎯 Debugging Modes
ElectronNET.Core supports three main debugging approaches, all configured through Visual Studio's launch profiles:
1. ASP.NET-First Debugging (Recommended)
Debug your .NET code directly with full Hot Reload support:
<!-- For Windows debugging -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<!-- For WSL/Linux debugging -->
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
3. Enable WSL Debugging
For WSL debugging, ensure:
WSL2 is installed and configured
Linux distribution is set in the launch profile
Project targets Linux RID for WSL debugging
🚀 Debugging Workflow
ASP.NET-First Debugging (Default)
Select "ASP.Net (unpackaged)" profile in Visual Studio
Press F5 to start debugging
Set breakpoints in your C# code
Use Hot Reload to edit ASP.NET code during runtime
Stop debugging when finished
Electron Process Debugging
Select "Electron (unpackaged)" profile
Press F5 to start debugging
Attach to Electron process if needed
Debug Node.js and Electron APIs
Cross-Platform Debugging
Set RuntimeIdentifier to linux-x64
Select "WSL" profile
Press F5 to debug in WSL
Test Linux-specific behavior
🔍 Debugging Tips
Hot Reload
Works with ASP.NET-first debugging
Edit Razor views, controllers, and pages
See changes instantly without restart
Preserves application state
Breakpoint Debugging
// Set breakpoints herepublicasyncTask<IActionResult>Index(){vardata=awaitGetData();// ← BreakpointreturnView(data);}
Process Management
ASP.NET-first mode automatically manages Electron process lifecycle
Proper cleanup on debugging session end
No manual process killing required
🛠 Troubleshooting
Common Issues
"Electron process not found"
Ensure Node.js 22.x is installed
Check that packages are restored (dotnet restore)
Verify RuntimeIdentifier matches your target platform
"WSL debugging fails"
Install and configure WSL2
Ensure Linux distribution is properly set up
Check that project targets correct RID
"Hot Reload not working"
Use ASP.NET-first debugging profile
Ensure ASPNETCORE_ENVIRONMENT=Development
Check for compilation errors
🎨 Visual Debugging
Placeholder for image showing Visual Studio debugging interface with Electron.NET
The debugging interface provides familiar Visual Studio tools:
✅ Native Visual Studio Experience - No complex setup or manual attachment
✅ Hot Reload Support - Edit ASP.NET code during debugging
✅ Cross-Platform Debugging - Debug Linux apps from Windows
✅ Multiple Debugging Modes - Choose the right approach for your needs
✅ Process Lifecycle Management - Automatic cleanup and proper termination