Connect Xamarin to Virtual Box - c#

I want to port my C#-Code to linux, so i have to debug under Mono.
Therefore i would use a VM Box with Linux OS and conect the Xamarin Studio, that runs under Windows, to the Box to debug on it with Mono.
Is it possible to connect my Xamarin Studio to the Oracle VM Virtual Box?
I tried it several times but the debugger didn't Start in 10 minutes. If i closed Xamarin during this starting process there was a this Message: Couldn't connect to Debugger.
If you have an other(easier) way to debug with Windows under Mono i am openminded for everything.

Does remote debugging still work?
https://ebsteblog.wordpress.com/2013/12/04/remote-debugging-with-monodevelop/

For those who are interested: Seems that it is possible. You have to connect the Xamarin to your VM Device and there you star the debugger agent. I couldn't start it yet but theoreticaly it should work. There's the problem:
patrick#patrick-VirtualBox:~$ mono --debug --debugger-agent=transport=dt_socket,adress=X.X.X.X:12345,server=y OSTest.exe
Cannot open assembly 'OSTest.exe': No such file or directory.
* Assertion at threads.c:391, condition `shutting_down' not met
Stacktrace:
Native stacktrace:
Don't know yet what this means.

Related

Visual Studio remote debugging (ssh) on linux OS (buildroot)?

I'm trying to attach Visual Studio 2019 to a linux machine (64-bit Intel) running a custom Buildroot OS. When I try to connect via ssh with a password I get the error:
"Unable to connect to the Microsoft Visual Studio Remote Debugger named user#ip.address. Operation not supported. Unknown error: 0x80004005."
This is what happens right after I enter my credentials in the Attach to Process screen. That is before I even see the list of processes to attach to.
If I point VS to a different Linux machine (Ubuntu) it immediately shows me a list of processes running on it.
Any idea what I'm missing? Buildroot's sshd server says: OpenSSH_7.5p1, OpenSSL 1.0.2k 26 Jan 2017 and I do have wget installed. I installed curl in case that was it, but it still didn't work.
My Buildroot system is not on the public internet, but I'm not sure that matters. I'm guessing/hoping there's a secret requirement that I'm missing and can't find via google. Anyone have any ideas to try?
Maybe your OS image has a minimalistic “ps” command which accepts no argument, I think the problem comes from there : maybe VS runs a “ps” with several arguments (e.g. aux) to get the process list but the ps returns an error.
Update: even if you change the "ps" command to a more complete one, you can see the list of processes but you still can't attach to a process. VS apparently uses other commands that don't exist under a minimalist Linux distribution for embedded.

Cannot deploy UWP app to raspberry pi 3

I'm getting an error :
Error: Unable to connect to the Microsoft Visual Studio Remote Debugger named 'minwinpc'. The Visual Studio 2017 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.
I'm trying to deploy an app to my RPI 3 running Windows 10 IoT Core v.10.0.16299.15.
I've tried:
Reinstalling Visual Studio 2017
Installing Visual Studio 2017 Remote Debugger.
Restarting the VS.
I noticed that Visual Studio 2015 remoter debugger is running on raspberry pi and it has 192.168.0.6:8116 as a remote machine name while in VS2017, rpi's address is 192.168.0.6:4002. Why are they different? Can someone help me?
As Martin & Belekz mentioned,you can check the configuration of target device and firewall setting.And more,I want to add that,please note the configuration of Authentication Mode.You should set it as "Universal(Unencrypted Protocol)".Use the mode whenever you are deploying to a remote device. Currently, this is for IoT devices, Xbox devices, and HoloLens devices, as well as Creators Update or newer PCs.
Look at my post here i have the same problem and i tried several things, but only after i done this i can deploy remotely to pi again:
Uninstall old 16299 SDK and download new 16299 SDK from here
Repair VS from VSInstaller
run sfc /scannow
Also make sure you're using Universal authentication mode and type the ip without port number (or even using 'minwinpc' is enough)
hope this helps
I never deployed software from VS to a RPi using an port in the IP address before. So maybe you are doing something special, or I'm doing something basic, but;
dubble check if you need to assign a port.
Start Windows 10 IoT Core Dashboard and check if the Pi is visible
in your network.
--> If not, try to ping to your Pi, using the CMD
ping 192.168.0.6
--> If the ping fails, check your IP address of your Pi with a physical
monitor.
Check the address in the build properties according to the steps above.
Hope this helps!
You can configure the remote debugger's IP address and port to point to the correct endpoint of your Remote debugger.
Right-click the UWP app project, choose Properties, and in Debug tab you will see Start options with Target device which should be set to Remote Machine and below you can manually enter the Remote debugger's IP address and port into the Remote Machine field (192.168.0.6:8116 in your case). You should include the 8116 port in the Remote Machine field as well.
This should make Visual Studio connect to the Remote debugger instead of the RPI itself.
Also try to turn off the firewall to verify if it does not interfere with the connection.
i have see same problem in my laptop. i solve this problem by following steps..
first of all can you install Windows 10 IOT SDK in your .net?
if no then first of all download and install.
otherwise update vs 2017.
when install vs 2017 then automatically install iot sdk.

Xamarin IOS app fails

New to using Xamarin with Visual Studio 2015. I have set up what I think is a very simple IOS app where it counts the number of button clicks.. I am using a MacInCloud machine as my build host. I am using an IPhone simulator.
When I build and deploy, the application sort of flashes for a moment and then goes away. It does this repeatedly. In the output window I get the following error
Launching 'NewApp.iOS' on 'iPhone 5 iOS 9.0'...
The app has been terminated.
Launch failed. The app 'NewApp.iOS' could not be launched on 'iPhone 5 iOS 9.0'. Error: An error occurred while executing MTouch. Please check the logs for more details.
The app has been terminated.
If anybody can offer me some direction with this it would be greatly appreciated.
--Jason
It has been a while since I had this specific issue. Try cleaning your project. Possibly go as far as deleting the bin/debug folder contents in your IOS project. Make sure your architecture is set to 86_64 under the build / advance tab. Make sure your MAC build client is up to date, Make sure you are building for debug. close VS and reopen. Also do a cold restart on your mac and windows machines. Don't "Reopen windows" either.

Mono command line program dies with "trace trap" message and nothing else

I have a command line Mono application running on the Mac (OSX Lion) and it dies misteriously with the following message:
[1] 53342 trace trap "/Library/Frameworks/Mono.framework/Versions/2.10.9/bin/mono" --debug
read: -p: no coprocess
This is running the app from MonoDevelop.
Anyone has any idea what is happening and how I can fix this? (or how I can try to figure out what it is)
Neither how to fix it, nor how to figure out what it is, but to isolate the problem:
Run it outside MonoDevelop. If it works, report a bug to MonoDevelop.
Run it outside MonoDevelop with the latest version of Mono (2.11.3). If it still fails, file a bug to Mono.
(If you have access to a Linux box, try there too because it may be a bug in Mono that only affects Mac platform.)
Bugs are filed in http://bugzilla.xamarin.com/
In the end the issue was that there was code like this in the app:
#if DEBUG
Debugger.Break();
#endif
The application was being compiled in Debug and I was running the app like this:
mono Cli.exe
And when the interpreter found this piece of code, there was no debugger available when the trap signal was sent. While on Windows a dialog is opened asking you if you want to debug the app, on MacOS the application just commits suicide. The fix was to not execute this code if running on a Mac (or running the app inside of GDB).

mono : Is remote debugging possible with monodevelop?

mono : Is remote debugging possible with monodevelop? I want to remote debug a console application running on a remote RHEL server with monodevelop installed on CentOS development machine. Is this possible with monodevelop?
This could actually be done with the Soft Debugger.
Currently, no. This is not possible. I have heard the MonoDevelop team mention they would like this feature in the future, but I do not believe they have a schedule yet for when they will get to it.
The new Soft Debugger and the MD addin do support remote debugging but there's no way to set up the debugger session from within MD (except for iPhone apps).
Also, despite its name, the MeeGo addin supports remotely running and debugging apps on any GDM-based Linux machine over SSH. It could easily be modified to support machines without X, or running different project types.
http://anonsvn.mono-project.com/viewvc/trunk/monodevelop/extras/MonoDevelop.MeeGo/README.txt

Categories

Resources