简体   繁体   中英

Cannot use visual studio 2019 ssh debug with raspberry pi 4

I'm using Visual Studio and Raspberry PI 4 for my personal project. For now, I'm making a small console application and successfully copied and ran on Raspberry PI 4 I'm following this tutorial to setup remote debugger from Visual Studio 2019 to my Raspberry PI 4 .

Everything seemed to be fine, until I Attach to process When I entered my Raspberry information and click on Connect, there is one error popup appeared:

在此处输入图像描述

Unable to connect to pi@raspberrypi. An operation is not legal in the current state .

With the input information, I can remote to my Raspberry normally.

Anything wrong with my settings?

Thank you,

Thanks to Alan Shurack (from the microsoft forums) there is a workaround for the problem of the Ssh debugging in Visual Studio 2019 [16.7.2] (It defenetly worked at version [16.5.4])

Workaround:

Adding and connecting to the connection under Tools->Options->Cross Platform->Connection Manager will solve the problem.

Search for "Edit and Set Default Remote SSH Connections" in the release notes: https://devblogs.microsoft.com/visualstudio/visual-studio-2019-v16-7-releases/

The issue with visual studio is being fixed and can be viewed in this thread https://developercommunity.visualstudio.com/content/problem/1161746/attach-to-process-using-ssh-not-working-visual-stu.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM