首页 文章

是否可以使用Ubuntu Linux版MonoDevelop 6.0监视窗来检查局部变量?

提问于
浏览
0

我正在调试使用Roslyn csc.exe编译器编译的修改过的C#pure .NET CoreCLR Hello World应用程序 . Hello World C#程序如下所示:

using System;

namespace TestingMonoDevelop6.0
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            string value = "one";
            Console.WriteLine("Hello World!");
        }
    }
}

这是Roslyn csc.exe编译器指令和结果:

构建TestingMonoDevelop6.0(Debug | x86)执行:/home/venkat/roslyn/Binaries/Debug/csc.exe / noconfig / nostdlib / debug:portable / out:/ home / venkat / Caisse / Caisse / bin / Debug / Caisse.exe /r:/home/venkat/Sandbox/Microsoft.CodeAnalysis.dll /r:/home/venkat/Sandbox/Microsoft.Data.Sq

Microsoft(R)Visual C#编译器版本42.42.42.42版权所有(C)Microsoft Corporation . 版权所有 .

Program.cs(9,11):警告CS0219:分配变量'value'但从不使用其值

----------------------完成----------------------

Build 成功 .

这是Ubuntu Linux 14.04 LTS单声道版本和路径 .

[mono-2015.12.15 14.05.01] venkat @ clickit:〜/ monodevelop $ which mono /opt/mono-2015.12.15 14.05.01 / bin / mono

因此,我被告知Monodevelop 6.0将在月份之前在github.io.mono.monodevelop论坛中支持Roslyn csc.exe编译 . 我的第一个问题是我们如何要求使用Roslyn csc.exe编译器编译Monodevelop 6.0?

当我在Ubuntu上创建以下Monodevelop 6.0 C#自定义构建步骤时:/home/venkat/roslyn/Binaries/Debug/csc.exe / noconfig / nostdlib / debug:portable / out:/ home / venkat / December14 / December14 / bin /Debug/Program.exe /r:/home/venkat/Sandbox/Microsoft.CodeAnalysis.dll /r:/home/venkat/Sandbox/Microsoft.Data.Sqlite.dll /r:/home/venkat/.dnx/packages /System.Collections/4.0.11-beta-23409/ref/dotnet/System.Collections.dll /r:/home/venkat/.dnx/packages/System.Collections.NonGeneric/4.0.0/ref/dotnet/System .Collections.NonGeneric.dll /r:/home/venkat/.dnx/packages/System.ComponentModel/4.0.1-beta-23516/ref/dotnet5.1/System.ComponentModel.dll / r:/ home / venkat / Sandbox / System.dll /r:/home/venkat/.dnx/packages/System.Data.Common/4.0.1-beta-23516/ref/dotnet5.1/System.Data.Common.dll / r:/ home /venkat/.dnx/packages/System.Xml.ReaderWriter/4.0.10-beta-22816/lib/contract/System.Xml.ReaderWriter.dll /r:/home/venkat/.dnx/packages/System.Xml . XmlDocument的/ 4.0.0-β-22816 / lib目录/ Contract / System.Xml.XmlDocument.d ll /r:/home/venkat/.dnx/packages/Microsoft.CSharp/4.0.1-beta-23409/ref/dotnet/Microsoft.CSharp.dll /r:/home/venkat/Sandbox/System.Runtime.dll /r:/home/venkat/Sandbox/System.Xml.XDocument.dll /r:/home/venkat/Sandbox/System.Xml.dll /r:/home/venkat/Sandbox/System.Threading.Tasks.dll / r:/home/venkat/Sandbox/System.Linq.dll /r:/home/venkat/Sandbox/System.Xml.dll /r:/home/venkat/Sandbox/mscorlib.dll Program.cs,

它成功编译 . 当我开始调试Roslyn生成的可执行文件并在i上使用Monodevelop Watch窗口时,我收到以下错误

消息:未知变量i

当我在Console.WriteLine(“Hello World!”)行上设置断点时 .

我的第三个问题是我是否必须在Monodevelop 6.0 for Linux中创建一个自定义执行步骤来引用Corerun Program.exe而不是单个Program.exe?

1 回答

  • 0

    问题1的答案,“我们如何要求使用Roslyn csc.exe编译器编译Monodevelop 6.0?”是:

    /home/venkat/roslyn/Binaries/Debug/csc.exe /noconfig
      /nostdlib /debug:portable
      /out:/home/venkat/December14/December14/bin/Debug/Program.exe
      /r:/home/venkat/Sandbox/Microsoft.CodeAnalysis.dll
      /r:/home/venkat/Sandbox/Microsoft.Data.Sqlite.dll
      /r:/home/venkat/.dnx/packages/System.Collections/4.0.11-beta-23409/ref/dotnet/System.Collections.dll
      /r:/home/venkat/.dnx/packages/System.Collections.NonGeneric/4.0.0/ref/dotnet/System.Collections.NonGeneric.dll
      /r:/home/venkat/.dnx/packages/System.ComponentModel/4.0.1-beta-23516/ref/dotnet5.1/System.ComponentModel.dll
      /r:/home/venkat/Sandbox/System.dll
      /r:/home/venkat/.dnx/packages/System.Data.Common/4.0.1-beta-23516/ref/dotnet5.1/System.Data.Common.dll
      /r:/home/venkat/.dnx/packages/System.Xml.ReaderWriter/4.0.10-beta-22816/lib/contract/System.Xml.ReaderWriter.dll
      /r:/home/venkat/.dnx/packages/System.Xml.XmlDocument/4.0.0-beta-22816/lib/contract/System.Xml.XmlDocument.dll
      /r:/home/venkat/.dnx/packages/Microsoft.CSharp/4.0.1-beta-23409/ref/dotnet/Microsoft.CSharp.dll
      /r:/home/venkat/Sandbox/System.Runtime.dll
      /r:/home/venkat/Sandbox/System.Xml.XDocument.dll
      /r:/home/venkat/Sandbox/System.Xml.dll
      /r:/home/venkat/Sandbox/System.Threading.Tasks.dll
      /r:/home/venkat/Sandbox/System.Linq.dll
      /r:/home/venkat/Sandbox/System.Xml.dll
      /r:/home/venkat/Sandbox/mscorlib.dll Program.cs
    

    回答问题2,"When I start debugging the Roslyn generated executable and using the Monodevelop Watch window on i, I get the following error message: Unknown variable i when I set a breakpoint on the Console.WriteLine(" Hello World! ") line." . 单声道运行时是mdb无错误,非Window OS上的Roslyn编译器只能生成便携式pdb . 在XamarinStudio-> Debugger组件的https://bugzilla.xamarin.com/处有一个可重现的Macintosh open bug . 请参阅https://gitter.im/dotnet/roslyn .

    问题3的答案,我是否必须在Monodevelop 6.0 for Linux中创建自定义执行步骤,引用Corerun Program.exe而不是单声道Program.exe?是 . 事实上,如果希望定位CoreCLR,他们应该使用Roslyn csc.exe编译器 .

相关问题