Bug 11262 - VisualStudio - unable to debug on device, build starts twice
Summary: VisualStudio - unable to debug on device, build starts twice
Status: VERIFIED NOT_REPRODUCIBLE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 1.1.x
Hardware: Macintosh Windows
: High major
Target Milestone: 1.2.x
Assignee: Vinicius Jarina
URL:
Depends on:
Blocks:
 
Reported: 2013-03-19 10:58 UTC by Michał Mazur
Modified: 2016-05-10 17:03 UTC (History)
9 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED NOT_REPRODUCIBLE

Description Michał Mazur 2013-03-19 10:58:18 UTC
Hi, after solving the problem with resources we have another one while configuring the Visual Studio environment. Our solution builds fine and runs on the iPhone simulator (although the debugging is slooow - it takes about a second for each 'step over'). It does not however run on device.
The effect is quite strange: 1. I press the Debug button 2. Remote build starts 3. After about 3 mins it finishes with the application deployed to device 4. The debugger nor application do not start, however 5. Another mac build starts immediately 6. In the deployment phase the 'Debug' arrow in Visual Studio returns to green - the debug process finishes 7. The application is deployed after this, but is not started

The 'HelloWorld' application run just fine on device . I guess that the issue might be related to the size of our solution, which is made of ~40projects (and therefore takes time to compile).

Please find some logs below.
The Mac Server log.
First build, as you can see another build starts after first one finishes.

[2013-03-15 16:21:19.9] Handling with command: [Deploy: CommmandUrl=Deploy] (10)
[2013-03-15 16:21:19.9] Attempting to acquire command execution lock, timeout set to 00:10:00
[2013-03-15 16:21:19.9] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --installdev "/Users/mcze/Library/Caches/Xamarin/mtbs/builds/MMLite/0a07a20a-82a3-4876-a1b9-dae804063303/output/Debug/iPhone/MMLite.app"
[2013-03-15 16:22:04.1] stdout: Please ensure your device is connected...
[2013-03-15 16:22:04.1] Connected to: iPhone3 (KSOB)
[2013-03-15 16:22:04.1] Initializing file service...
[2013-03-15 16:22:04.1] Transferring application
[2013-03-15 16:22:04.1] Finalizing file service...
[2013-03-15 16:22:04.1] Installing application
[2013-03-15 16:22:04.1] Application installed
[2013-03-15 16:22:04.1] 
[2013-03-15 16:22:04.1] Command [Deploy: CommmandUrl=Deploy] finished (10)
[2013-03-15 16:22:18.1] Handling with command: [Info: CommmandUrl=Info] (10)
[2013-03-15 16:22:18.1] Attempting to acquire command execution lock, timeout set to 00:10:00
[2013-03-15 16:22:18.1] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --listdev
[2013-03-15 16:22:19.3] stdout: iPhone3 (KSOB): bfab8244089d128a16f8ba47a153e39c5d2a0c45
[2013-03-15 16:22:19.3] 
[2013-03-15 16:22:19.3] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --entitlements
[2013-03-15 16:22:20.0] stdout: 2aa3a9c70698ef689b4aaa05a5eae32ac84d840b MonoTouch Business 2013-09-13T09:12:53
[2013-03-15 16:22:20.0] 
[2013-03-15 16:22:20.0] Command [Info: CommmandUrl=Info] finished (10)
[2013-03-15 16:22:20.1] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --entitlements
[2013-03-15 16:22:20.8] stdout: 2aa3a9c70698ef689b4aaa05a5eae32ac84d840b MonoTouch Business 2013-09-13T09:12:53
[2013-03-15 16:22:20.8] 
[2013-03-15 16:22:20.8] Handling with command: [FileManifest: CommmandUrl=FileManifest] (10)
[2013-03-15 16:22:20.8] Attempting to acquire command execution lock, timeout set to 00:10:00
[2013-03-15 16:22:25.1] Command [FileManifest: CommmandUrl=FileManifest] finished (10)

The end of second build:
[2013-03-15 16:24:44.9] Handling with command: [Deploy: CommmandUrl=Deploy] (10)
[2013-03-15 16:24:44.9] Attempting to acquire command execution lock, timeout set to 00:10:00
[2013-03-15 16:24:45.0] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --installdev "/Users/mcze/Library/Caches/Xamarin/mtbs/builds/MMLite/0a07a20a-82a3-4876-a1b9-dae804063303/output/Debug/iPhone/MMLite.app"

The Debug window after first build:
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'Z:\Documents\Projects\MP.N\DEV-GUID-KEYS\MWModule\AC.Mobile.UI.Lite\bin\iPhone\Debug\MMLite.vshost.exe'
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'
The thread 'vshost.NotifyLoad' (0xcc8) has exited with code 0 (0x0).
The thread '<No Name>' (0xd64) has exited with code 0 (0x0).
The thread '<No Name>' (0x2e8) has exited with code 0 (0x0).
The thread 'vshost.LoadReference' (0xfa0) has exited with code 0 (0x0).
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'Z:\Documents\Projects\MP.N\DEV-GUID-KEYS\MWModule\AC.Mobile.UI.Lite\bin\iPhone\Debug\MMLite.exe', Symbols loaded.

After second build (just before the deployment finishes it is the moment when debugging process stops):
The thread '<No Name>' (0x2e8) has exited with code 0 (0x0).
The thread 'vshost.LoadReference' (0xfa0) has exited with code 0 (0x0).
'MMLite.vshost.exe' (Managed (v4.0.30319)): Loaded 'Z:\Documents\Projects\MP.NET\DEV-GUID-KEYS\MWModule\AC.Mobile.UI.Lite\bin\iPhone\Debug\MMLite.exe', Symbols loaded.
The thread '<No Name>' (0xea4) has exited with code 0 (0x0).
The program '[1764] MMLite.vshost.exe: Managed (v4.0.30319)' has exited with code -1 (0xffffffff).
Comment 1 Michał Mazur 2013-03-20 05:00:17 UTC
Hi Jarina

We've made some tests and the behavior described above also occurs only on one of three Macs we use. But this time the Mac I am using is able to debug application on the device (but the other bug i posted occurs: https://bugzilla.xamarin.com/show_bug.cgi?id=11258). Other developers are not able to debug application on the device but have no problems with license queries, so at least they can debug application on iOS simulator.

Cheers
Comment 2 Vinicius Jarina 2013-04-11 14:54:41 UTC
Hello Michal

Still having issues debugging on the Device with latest Xamarin.iOS ?

Thank you.
Comment 3 Dominique Louis 2013-06-03 16:48:36 UTC
Fixed. Please re-try with latest 1.2.x release.
Comment 4 narayanp 2013-06-18 08:01:34 UTC
Today we have checked this issue with following builds:

Windows 7 with Mountain Lion and Lion
Windows 8 with Mountain Lion and Lion
VS 2012/2010
iOS for VS 1.2.121

We are successfully able to deploy iOS application on device on Mac server using VS in debug mode as well as in release mode.

Changing the status of this issue to Verified