C# Xamarin.iOS调试器不';不附加

C# Xamarin.iOS调试器不';不附加,c#,ios,xamarin.ios,xamarin,C#,Ios,Xamarin.ios,Xamarin,我们有一个特定的应用程序,调试器不会与Xamarin Studio连接。我们尝试了最新的稳定和测试频道,但运气不佳。它发生在模拟器或设备上 当调试器分离时,我们可以在XCode的控制台中看到: Jun 18 15:41:51 Hitcents-iPad-2 kernel[0] <Debug>: lockbot[3258] Builtin profile: debugserver (sandbox) Jun 18 15:41:51 Hitcents-iP

我们有一个特定的应用程序,调试器不会与Xamarin Studio连接。我们尝试了最新的稳定和测试频道,但运气不佳。它发生在模拟器或设备上

当调试器分离时,我们可以在XCode的控制台中看到:

        Jun 18 15:41:51 Hitcents-iPad-2 kernel[0] <Debug>: lockbot[3258] Builtin profile: debugserver (sandbox)
        Jun 18 15:41:51 Hitcents-iPad-2 com.apple.debugserver-199[3270] <Warning>: Got a connection, waiting for debugger instructions.
        Jun 18 15:41:51 Hitcents-iPad-2 com.apple.debugserver-199[3270] <Warning>: 1 +0.000000 sec [0cc6/0303]: error: ::ptrace (request = PT_THUPDATE, pid = 0x0cc7, tid = 0x2503, signal = -1) err = Invalid argument (0x00000016)
        Jun 18 15:41:51 Hitcents-iPad-2 com.apple.debugserver-199[3270] <Warning>: 2 +0.004989 sec [0cc6/1303]: error: ::read ( 5, 0x2fe809fc, 18446744069414585344 ) => -1 err = Bad file descriptor (0x00000009)
        Jun 18 15:41:51 Hitcents-iPad-2 com.apple.debugserver-199[3267] <Warning>: 1 +0.000000 sec [0cc3/0303]: error: ::read ( 5, 0x2fd4bebc, 1024 ) => 0 err = Bad file descriptor (0x00000009)
        Jun 18 16:55:11 Hitcents-iPad-2 mobile_installation_proxy[3471] <Error>: main: Could not receive request from host.
        Jun 18 16:55:11 Hitcents-iPad-2 mobile_installation_proxy[3468] <Error>: main: Could not receive request from host.
        Jun 18 16:55:12 Hitcents-iPad-2 BattlePillars[3474] <Warning>: MonoTouch: Debugger not loaded (disabled).

否则它将在调试时崩溃。

是否有人意外关闭了调试器?:)选中项目选项->构建->iOS构建->启用调试

将“-v-v-v”(不带引号)添加到项目的iOS构建选项中的其他mtouch参数,重新编译,并查看是否有任何内容打印到应用程序输出和(设备/系统)控制台。

选中此复选框以查看适当的配置:
Debug | iPhone
Debug | iPhone Simulator
我没有看到任何新内容,但我在XCode的控制台中又添加了几行。@jonathanpeppers:这是唯一的“MonoTouch:”行吗?如果这是唯一一行,那么您必须以某种方式禁用应用程序设置中的调试。请参阅上面的我的项目文件,
为真。你有没有看到其他可以关掉它的东西?我还仔细检查了解决方案中的配置映射,这些也很好。@jonathanpeppers:对不起,我不清楚,我指的是设备设置中显示的应用程序设置(打开设备上的设置,在底部会有一个应用程序列表,其中一个应该是你的应用程序,你应该有一个“调试设置”部分,其中“已启用”是的,此应用程序的设置组根本不存在。已尝试将其从设备中删除并重新部署。什么可以移除它?我没有自定义设置包或任何东西。关闭TestFlight进行调试对我来说很有效。这意味着在第一行(#if!DEBUG)中添加一个“!”是的,这是一个输入错误,谢谢。您在哪里添加testflight?您将此代码放在AppDelegate FinishedLaunching方法中。
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
    <ProductVersion>10.0.0</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{07958BCE-7F33-4F8F-9A86-5102FF4632FB}</ProjectGuid>
    <ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <OutputType>Exe</OutputType>
    <RootNamespace>MyAppName</RootNamespace>
    <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
    <AssemblyName>MyAppName</AssemblyName>
  </PropertyGroup>

<!--Further down-->

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
        <Optimize>False</Optimize>
        <OutputPath>bin\iPhone\Debug</OutputPath>
        <DefineConstants>DEBUG, IPHONE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
        <ConsolePause>False</ConsolePause>
        <MtouchDebug>True</MtouchDebug>
        <CodesignKey>iPhone Developer</CodesignKey>
        <CrashReportingApiKey />
        <MtouchI18n />
        <MtouchArch>ARMv7</MtouchArch>
        <IpaPackageName />
        <OptimizePNGs>false</OptimizePNGs>
        <MtouchLink>None</MtouchLink>
        <MtouchExtraArgs>-v -v -v</MtouchExtraArgs>
      </PropertyGroup>
#if !DEBUG
     TestFlight.TakeOff("key");
#endif