I'm writting ASP.NET Core APP in .NET Core 2.1 on Windows and after deploying it on server after using
dotnet publish --configuration Debug -r linux-x64
I'm unable to connect via remote debugger over SSH
because:
WARNING: Could not load symbols for 'Common.dll'. '/home/dev/Common.pdb' is a Windows PDB. These are not supported by the cross-platform .NET Core debugger.
Why it does happen? and how I have to publish to be able to debug it remotely?
Set up the remote debugger on Windows ServerOn the remote computer, find and start the Remote Debugger from the Start menu. If you don't have administrative permissions on the remote computer, right-click the Remote Debugger app and select Run as administrator.
In Visual Studio, open Tools > Options > Debugging > Symbols (or Debug > Options > Symbols).
In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5. The debugger pauses at the breakpoints.
Only portable PDBs are supported around all platforms in .NET Core. You have to enable them in your csproj
file
<DebugType>portable</DebugType>
You can also check the documentation and follow some articles, like this or this explaining how to setup this kind of debugging over SSH using vsdbg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With