Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Xamarin #34

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

VysotskiVadim
Copy link

This is some kind of proof of concept, which shows that it's possible to debug Xamarin application using VS Code. I'd like you to review the idea and probably help me with advice.

Now it supports only Xamarin.Android, but Xamarin.IOS is similar.
To start debugging build and deploy Xamarin.Android application via command line or ide, then define "packageName": "com.yourapp.name" in launch configuration, then run debugger. Debugger expects that you have adb in path. I tested debugger only on mac os.

Xamarin uses some "special" way to connect sdb, you can find more details here https://github.com/xamarin/xamarin-macios/blob/xamarin-mac-3.4.0.33/runtime/monotouch-debug.m#L1270 android has similar code, so I just send few packages before starting connection.

I'm going to continue implementing Xamarin.Anroid debug, then I will implement Xamarin.IOS debug.

Please, share you thoughts about this feature with me.

@VysotskiVadim
Copy link
Author

Added example

@borgdylan
Copy link

I have made this work in the past by setting properties by means of ADB, and using the attach support already available.

@VysotskiVadim
Copy link
Author

@borgdylan , you're right, it is how debugger works.

But it's not enough for comfortable work: debugger functionality should include:

  1. Install application on device: for first release we can work only with one device, but in future it should be some kind of drop down where we can select device. I believe installing should be done by MsBuild tasks because build system know where to find compilation artifacts, and Xamarin already have nice infrastructure for installing. Now I use Install target from Xamarin.Android, but unfortunately I hasn't found something similar for Xamarin.IOS. Any way it's possible to install via libmobiledevice.
  2. Launch application. It's not a problem for Android, hasn't investigated for IOS yet.
  3. Connect output from device.
  4. Connect debugger.

@msftclas
Copy link

msftclas commented Oct 5, 2017

CLA assistant check
All CLA requirements met.

@VysotskiVadim
Copy link
Author

Demo with current functionality: https://youtu.be/RnWTy1D031k

@SimantoR
Copy link

Hi, loving this project. This could very well enable Xamarin App development in Linux systems. Anyone tried this on Ubuntu or any other Linux distro yet?

@VysotskiVadim
Copy link
Author

@SimantoR, yes check vscode-xamarin-debug, it's tested on Ubuntu.

Base automatically changed from master to main February 26, 2021 14:41
@weinand weinand removed their assignment Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants