Visual studio Xamarin not hitting breakpoints - c#

I have installed VS 2017, version 15.3.3, breakpoints are working perfectly on web asp mvc projects but not working on xamarin projects, either: PCL, Android or iOS.
(I am on Debug mode) everything is installed in its default setting, I have not changed any project options

If you are debugging with the Android emulator, you might need to tick "migrate to physical computer with a different processor version" under Hyper-V manager -> Image -> Settings -> Processor -> Compatibility. This resolves random app crashes and also allows debugging from visual studio to work.

I've had this issue before, and restarting Xamarin Studio / deleting the app and cleaning/rebuilding/reinstalling worked.

I Solved it,
checked checkboxes was unchecked, now it's working

Related

Breakpoints not working in xamarin uwp in Visual Studio 2017

I am new in Xamarin Forms. Using xamarin application breakpoints work very well under Android but fails with UWP.
Checking option project → Properties → Build → "Compile using the native code tool chain" causes navigation to not work.
NB: vs 2017 is up to date (version 15.5.7)
This can happen if xamarin is used with .net standard, by default the shared library uses the 'portable' debug mode, if it is changed to 'Full' it should work correctly.
Go to Project properties -> build -> Advanced -> Debuggingh information and set Full.

Xamarin android emulator on Visual Studio 2017 blacked out

So I'm trying my hand at making mobile apps using C# and Xamarin on Visual Studio 2017. What I'm trying to do is test out the system by making a simple application that has two buttons that either increment or decrements a number by 1 when clicked. Nothing fancy. But when I try to run the android emulator, it is just a black screen. Nothing loads. And when I "x" out of the emulator, I get a There were deployment errors. Continue? dialogue box when it's done.
I have searched all over for a solution, and nothing I've tried has worked so far.
Among the things I have tried:
Enabling virtualization in the BIOS settings.
Disabling "Use host GPU" in the AVD.
Change from Debug mode to Release mode.
Ticked "Wipe User Data" from the launch options.
Restarts and rebuilds along with "clean Solution" here and there.
I also tried using the Xamarin Live Player paired with my phone to no avail.
(Also, I have no drawable icon in my drawable folder under resources. Is that anything that's necessary??)
Here's a screenshot of my problem:
https://imgur.com/a/6OhCA
I'm using Visual Studio 2017 on Windows 7.
If you have JDK 9 installed you can try uninstalling it.
https://developer.xamarin.com/guides/android/troubleshooting/questions/jdk9-errors/#Known_Issues_with_JDK_9
This fixed the problem for me. I had JDK 9 installed and even if in my Xamarin options I was pointing to JDK 8 folder, it was messing up my deployment.

Xamarin Android Visual Studio let deploy override app

I use visual studio 2015 with xamarin android for my project. I build and debug on a Samsung SM-G389F(Android 6.0 - API 23). Everytime I build my project and deploy it to my device it will not override the previously build app. I have to manually delete the existing app in order to see some changes.
Is there a way in visual studio to let the app be successfully deployed?
Is this a bug or are my settings wrong?
thanks.
Sounds like you might have Fast assembly deployment enabled and it's not working correctly. Here's what to do:
Go to project's properties and Android Options tab.
Turn off Use Fast Deployment
Uninstall the app completely from the device.
Rebuild the whole project (rebuild also does cleans the project)
Try to deploy again

Visual Studio Xamarin: Could not connect to the debugger

I'm working with Visual Studio Community 2015 Update 3 and the Visual Studio Emulator for Android (API Level 19). Everything works fine, but since last Xamarin update I can't deploy to Visual Studio Emulator.
I click on run at visual studio and it deploys the app to the emulator (I cann see it in app drawer), then it starts the app.
But the app closes immediately, and visual studio says at output:
Could not connect to the debugger.
Solutions I tried already (without success):
Enabled Migrate to a physical computer with a different processor version in Hyper-V settings
Disabled Use Fast Deployment in project settings
EDIT: On my real phone I can debug this app.
EDIT2: Here's the logcat output
I had the same problem and it's really frustrating!
I had the problem for both Visual Studio 2019 and Visual Studio 2022.
I tried literally every solution on the web, and none of these worked for me:
updating everything in Visual Studio to the latest version
updating every Android SDK and component
sending various adb commands via the ADB console (like: adb -s 10.0.2.2:5554 root)
#TienQuang solution in this post
restarting multiple times Visual Studio and Windows
deleting and recreating Android emulators images
I was really out of solutions to try, and then...I simply reset my emulator proxy configuration (the always worked fine) switching to the "default Android Studio HTTP proxy settings", and now I can debug my application!
I've had this problem before. My problem was that the emulator was old and could not load things properly and was really slow. I suggest upgrading to a different emulator or just using your phone for debugging. If you want, you could try running it in release and see if it runs then. If not create a new emulator from the AVD Manager.

Visual Studio Freezes when I try to Add a file

I have an ASP.NET MVC application that I'm working on in Visual Studio 2013 Premium. I have three projects that are underneath my solution. If I right-click on any of the folders that are immediately under my solution and choose add, the flyout from the context menu displays fine and Visual Studio continues to function normally.
If I right click on any (I've tried a few but not all) folder underneath one particular project in Visual Studio, it freezes for about fifteen minutes. The cpu and memory usage when this is going on seem pretty normal.
If I right click on any of the folders underneath the other two projects and choose Add I get the flyout to appear showing the types of things I can add to the folder and everything works just fine.
What I've tried:
Disabling all Visual Studio Extensions that can be disabled. This didn't fix it.
Starting an instance of Visual Studio in Safe mode, this does fix it.
Any idea what I can try next? I'd hate to have to manually uninstall all of the Visual Studio extensions that can't be disabled, but this seems like the logical next course of action.
As far as Extensions I have:
Application Insights Behaviors SDK (XAML)
Bing Dev. Assistant (Disabled, installed after problem started)
Find in Solution Explorer (Disabled)
Company-created Build Tools (Disabled)
Company-created Core Tools
Company-created Scaffolding Tools (Disabled)
Microsoft Advertising pubCenter
Microsoft Advertising SDK for Win 8.1
Microsoft Advertising SDK for WP 8.1 XAML
Microsoft ASP.NET and Web Tools
Microsoft Visual Studio ASP.NET MVC 5 Scaffolding
Nuget Package Manager
Productivity Power Tools (Disabled)
Release Management for VS 2013
TFS Server Power Tools for VS 2013
TFS Sidekicks (Disabled)
TFS Process Template Editor
TFS Team Collab.
TFS Work Item Type Designer
Unit Test Generator (Disabled)
Visual F#
VS Extensions for Windows Library for JavaScript
WP 8.1 SDK Integration
Workflow Manager Activities
I don't need the WP 8.1 stuff here at work, but dabble with it at home. Since I'm logged into my MSDN account in Visual Studio at both places, would it uninstall it from my home PC if I uninstall it at work?
I'm doing a little further exploration. On the project that has the problem, when I try to do an add to a folder, I'm seeing Nuget.exe get fired off every six seconds over and over again. Where would I look to see where this is set up? I assume in the .csproj file.
Thanks
I disabled and uninstalled a bunch of Visual Studio extensions, which didn't help. I then cleared my nuget cache and that solved my problem.
I had exactly the same problem apparently, in my case it was a reference problem try deleting them one by one until the it starts responding in real time, i suggest starting with 3rd party dlls.

Categories

Resources