Remote debugging does't work with trimmed application.
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 17h 56m
- Merged PRs (30d)
- 21
Description
## Environment data
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: debian.9-x64
Base Path: /usr/share/dotnet/sdk/3.0.100/
Host (useful for support):
Version: 3.0.0
Commit: 95a0a61858
.NET Core SDKs installed:
3.0.100 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
VS Code version:Version: 1.39.2
C# Extension version: 1.21.9
## Steps to reproduce
1. Create Hello World app.
2. Publish as self-contained and linux-arm.
3. Copy it to the target, start the app.
4. Remote debugging works fine with:
``` json
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
},
{
"name": ".NET Core SSH Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickRemoteProcess}",
"pipeTransport": {
"pipeProgram": "ssh",
"pipeArgs": [
"-T",
"admin@192.168.0.10"
],
"debuggerPath": "~/.vs-debugger/vs2019/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": true
},
"justMyCode": false,
"symbolOptions": {
"searchPaths": ["~/apps"],
"searchMicrosoftSymbolServer": false
},
"requireExactSource": false,
}
]
}
```
5. Add the property: *PublishTrimmed = true*. It doesn't work any more.
Project file:
```xml
Exe
netcoreapp3.0
true
true
linux-x64
```
The Debugger console writes: **Module was built without symbols.**
Thanks for any support.
## Expected behavior
```
Starting: "ssh" -T admin@192.168.0.10 "~/.vs-debugger/vs2019/vsdbg --interpreter=vscode"
-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
Loaded '/var/volatile/tmp/.net/HelloWorld/vp3ilmdt.nde/System.Private.CoreLib.dll'. Cannot find or open the PDB file.
Loaded '/var/volatile/tmp/.net/HelloWorld/vp3ilmdt.nde/HelloWorld.dll'. Symbols loaded.
Loaded '/var/volatile/tmp/.net/HelloWorld/vp3ilmdt.nde/System.Runtime.dll'. Cannot find or open the PDB file.
Loaded '/var/volatile/tmp/.net/HelloWorld/vp3ilmdt.nde/System.Console.dll'. Cannot find or open the PDB file.
```
## Actual behavior
```
Starting: "ssh" -T admin@192.168.224.41 "~/.vs-debugger/vs2019/vsdbg --interpreter=vscode"
-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
Loaded '/var/volatile/tmp/.net/HelloWorld/xcxtqtit.mgz/System.Private.CoreLib.dll'. Cannot find or open the PDB file.
Loaded '/var/volatile/tmp/.net/HelloWorld/xcxtqtit.mgz/HelloWorld.dll'. Module was built without symbols.
Loaded '/var/volatile/tmp/.net/HelloWorld/xcxtqtit.mgz/System.Console.dll'. Module was built without symbols.
```
Contributor guide
Assessment
This issue has not been assessed yet.