dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.17k stars 4.72k forks source link

.net core 3.1 remote debugging from VS 2019 to Raspberry PI - can't open existing file #68013

Open lulu58 opened 2 years ago

lulu58 commented 2 years ago

Hello, I created a simple dotnetcore application (attached) that doestn´t work as expected while remote debugging. Have a Raspberry Pi 3B with Raspberry OS, remoting with ssh. If started from VS2019, the first attempt to read the file failes after start the app. After overwriting, the second read is ok. The file remains in the app dir. If you try to debug again from VS2019, the same behavior: first read failed, second read ok. Starting from a ssh console, the first read is ok. I updated the .net core 3 and vsdbg to latest version on Raspberry Pi. Am I wrong, or is there a bug in the vsdbg? Program.zip

ghost commented 2 years ago

Tagging subscribers to this area: @tommcdon See info in area-owners.md if you want to be subscribed.

Issue Details
Hello, I created a simple dotnetcore application (attached) that doestn´t work as expected while remote debugging. Have a Raspberry Pi 3B with Raspberry OS, remoting with ssh. If started from VS2019, the first attempt to read the file failes after start the app. After overwriting, the second read is ok. The file remains in the app dir. If you try to debug again from VS2019, the same behavior: first read failed, second read ok. Starting from a ssh console, the first read is ok. I updated the .net core 3 and vsdbg to latest version on Raspberry Pi. Am I wrong, or is there a bug in the vsdbg? [Program.zip](https://github.com/dotnet/runtime/files/8487514/Program.zip)
Author: lulu58
Assignees: -
Labels: `area-Diagnostics-coreclr`, `untriaged`
Milestone: -
tommcdon commented 2 years ago

Hi @lulu58, this sounds like it could be a permissions or file location issue, where the app is running as a different user or perhaps is running from a different working directory. When configuring vs 2019 remote debugging, are you logging in with the same ssh credentials to the raspberry pi 3? Adding @caslan who might have other suggestions.

lulu58 commented 2 years ago

Hi Tom, I checked my ssh credentials again. If there were missing access rights, wouln't then also the writing and the second reading of the file fail?