Monodevelop

ASP.NET

Web Projects

  • Create web application for any supported language.
  • Compile web application and view in browser using xsp.
  • Project GAC references are synchronised to web.config.
  • Add new ASP.NET files:
    • Page (.aspx) with/without CodeBehind class (partial if language supports it).
    • User control (.ascx) with/without CodeBehind class (partial if language supports it).
    • Web Service (.asmx) with/without CodeBehind class.
    • Web Handler (.ashx) with/without CodeBehind class.
    • Web.config (application or subdirectory depending where it’s added).
    • Master page (.master) with/without CodeBehind class (partial if language supports it) for 2.0 runtime only.
    • Global.asax file with/without CodeBehind class.
  • ASP.NET server controls added to aspx files have corresponding members automatically added to the CodeBehind class at compilation time (in the *.designer.* part if using partial classes).

Project Management

Building

  • Support for 1.1, 2.0 and Moonlight Mono runtimes (Project/Options/General/Runtime Options).
  • Support for multiple build configurations.
  • Builds required project dependencies.
  • Clean and Rebuild commands.
  • Assembly signing.
  • Command line tool for building: ‘mdtool build’.

Export

  • Export a project to a different folder using a different file format:
    • MonoDevelop native file format.
    • Visual Studio 2005.
  • Command line tool for exporting projects: ‘mdtool project-export’.

Custom commands

  • Custom commands can be defined for projects and solutions
  • Command hooks: after/before build, clean, execute
  • Command replacement: build, clean, execute
  • Custom commands: shown in the context menu of the solution pad.

Compiling

If you are building from Git, make sure that you initialize the submodules
that are part of this repository by executing:

To compile execute:

There are two variables you can set when running :

  • The install prefix:

    To install with the rest of the assemblies, use:
    —prefix=»pkg-config —variable=prefix mono»

  • The build profile:

    • : builds the MonoDevelop core and some stable extra add-ins.
    • : builds the MonoDevelop core only.
    • : builds everything
    • : builds for Mac OS X

PS: You can also create your own profile by adding a file to the profiles directory containing a list of the directories to build.

Disclaimer: Please be aware that the ‘extras/JavaBinding’ and ‘extras/ValaBinding’ packages do not currently work. When prompted or by manually selecting them during the ‘./configure —select’ step, make sure they stay deselected. (deselected by default)

Setting Up the Debugger

To enable MonoDevelop’s source level debugging (see below for details) you should firstly check that the Editor Attaching option is enabled in the Preferences on the External Tools panel. Then, you should synchronize the Unity project with the MonoDevelop project (menu: Assets > Open C# Project). Also, make sure that the Development Build and Script Debugging options are enabled in the Build Settings for your target platform (menu: File > Build Settings).

Just before starting a debugging session, select the target you wish to debug from the target list next to the play button (Unity Editor, OSX Player, etc.). You can also select “Attach To Process”, this will show the full list of debuggable Unity processes.

Play button and target list

With these steps completed, you are ready to being debugging your Unity scripts by clicking the play button.

Introduction

This document is meant as an introductory tutorial to Stetic, the GUI development tool of the MonoDevelop IDE. As part of the tutorial, we will be constructing a simple program for viewing log files. We’ll be using the widgets contained in the Gtk# library. This tutorial will demonstrate how to create the layout of the GUI, including the menu, and how to link this GUI to the underlying software.

Nate’s Log Viewer

The example program we’ll be making is a simple viewer for text-encoded log files. It won’t have many bells and whistles, but what we’re really interested in is using Stetic anyway. Here’s a picture of what the GUI looks like.

macOS

Building MonoDevelop from source on the Mac is straightforward when the latest Mono SDK package is installed. In general, the instructions in Development:Getting Started can be applied directly to building MD on macOS. However, there are a few caveats, so this page explains the Mac build process in more detail.

Building using Makefiles

Building

First you will need Xcode installed. If you have Xcode 4.3 or later, you will need to then install the Xcode Commandline tool from Xcode preferences, and install and from brew.

NOTE: Please ensure that you have the very latest Mono MDK.

Check out MD, configure using the Mac profile:

NOTE: DO NOT use configure –select on Mac — the Mac profile passes adds required arguments to the configuration of main.  Instead edit profiles/mac manually to add any additional modules.

IMPORTANT: Do not install MonoDevelop into the install prefix. MonoDevelop will pick up libraries from the prefix automatically. If you configured with a non-default prefix, then when you build an app bundle, the entire prefix will be merged into the app bundle.

Things you might have to do before running the script

  1. Tell aclocal where to find the pkgconfig M4 macro (pkg.m4), e.g.

    Comment: this did not appear necessary

  2. Add the GTK+ libraries’ location to the Mac dynamic loader path:

    Comment: this did not appear necessary

Building extras

To include additional addins from extras in the build, instead of using the Mac profile, use to select addins. This will write the default profile. Next, replace the line in profiles/default that begins with “main”  with the one from profiles/mac, then run configure again using the default profile.

Building the App package

To build the app package, navigate to the macOS build directory:

From here, build the MonoDevelop.app using . You can then build the .dmg using the script. To include addins from extras, manually copy their build directories into the MonoDevelop.app directory, e.g.

Building using MonoDevelop

When building MonoDevelop using MonoDevelop, be sure to select the Mac configuration, as this will enable building only the addins that work on Mac.

Main

Building main is straightforward. Open , select the Mac configuration, and run the Build command. Note that running MonoDevelop from within MD will currently only work if you export as described above.

Extras

Loading the full MonoDevelop.mdw workspace and building the addin solutions from extras will only work if the Makefiles’ configure script has been run. Even then, not all of them will build correctly. Until this is resolved, use the makefiles to build extras.

To update, run the following commands in the directory:

Source Level debugging

The currently open source files are shown as tabs in MonoDevelop and can be edited there with the features of a standard text editor. However, there is also a grey breakpoint bar to the left of the editor panel. Clicking in this bar will add a so-called breakpoint marker next to the line of code.

Breakpoint being added to code on line 16

Adding a breakpoint to a line instructs Unity to pause execution of the script just before it reaches that line during Play mode. When the script is “frozen” like this, you can use the debugger to determine exactly what the script is doing.

The arrow shows execution paused at the breakpoint

Information about the state of execution is shown in the tabs at the bottom of the MonoDevelop window when execution is paused at a breakpoint. Perhaps the most important of these is the Locals tab.

Tab showing variable values

This shows the values of local variables in the function that is currently executing. (A pseudo-local variable called “this” is automatically available in every function without being explicitly defined; it is a reference to the current script instance and so all variables defined in the script can be accessed via “this”.) You can use breakpoints in combination with the Locals tab to get a similar effect to adding statements to your code — you can interrogate the values of variables at any point you like. However, you can also edit the variable values in the Locals tab. This can be handy when you find a variable incorrectly set and you would like to see if the problem disappears when the value is set how it should be.

A further useful feature of MonoDevelop is single stepping. When execution is paused at a breakpoint, a bar of debugging tools will become available in the top portion of the MonoDevelop window:-

MonoDevelop stepping tools

The four buttons are known as Continue, Step Over, Step In and Step Out and can also be accessed as commands on the Run menu. Continue resumes execution until the next breakpoint is encountered. Step Over and Step In both execute one line of code at a time. The difference between the two is that Step Over executes any function calls within the line all at once, while Step In allows the stepwise execution to continue into the function. Since it is common to use Step In accidentally on a function that is known to be correct, Step Out continues execution to the end of the current function and then pauses again in the code that originally called it.

A detailed description of source level debugging techniques is not appropriate here but there are various books and web resources offering wisdom on the subject. Additionally, a little experimentation will help you get a feel for the power of the technique and how you can use it to track down most common types of bugs.

Console Window

Attaching MonoDevelop Debugger To An Android Device

Возможные проблемы

Что делать, если система не запускается? Существует множество возможных причин, которые помешают запуску MonoDevelop, и каждая из них требует индивидуального подхода. Если выяснить проблему невозможно, то лучше всего:

  • полностью удалить MonoDevelop и установить на чистую ОС;
  • проверить наличие всех необходимых программ и обновлений;
  • переустановить утилиту, которая связана с MonoDevelop (Unity или Visual Studio, к примеру).

Процесс работы с языком C# сложен и доступен не для многих. Тем не менее, если вам приглянулась идея научиться писать код, то открытая среда разработки MonoDevelop станет отличным решением, особенно для владельцев Linux и macOS.

Source Level debugging

The currently open source files are shown as tabs in MonoDevelop and can be edited there with the features of a standard text editor. However, there is also a grey breakpoint bar to the left of the editor panel. Clicking in this bar will add a so-called breakpoint marker next to the line of code.

Breakpoint being added to code on line 16

Adding a breakpoint to a line instructs Unity to pause execution of the script just before it reaches that line during Play mode. When the script is “frozen” like this, you can use the debugger to determine exactly what the script is doing.

The arrow shows execution paused at the breakpoint

Information about the state of execution is shown in the tabs at the bottom of the MonoDevelop window when execution is paused at a breakpoint. Perhaps the most important of these is the Locals tab.

Tab showing variable values

This shows the values of local variables in the function that is currently executing. (A pseudo-local variable called “this” is automatically available in every function without being explicitly defined; it is a reference to the current script instance and so all variables defined in the script can be accessed via “this”.) You can use breakpoints in combination with the Locals tab to get a similar effect to adding statements to your code — you can interrogate the values of variables at any point you like. However, you can also edit the variable values in the Locals tab. This can be handy when you find a variable incorrectly set and you would like to see if the problem disappears when the value is set how it should be.

A further useful feature of MonoDevelop is single stepping. When execution is paused at a breakpoint, a bar of debugging tools will become available in the top portion of the MonoDevelop window:-

MonoDevelop stepping tools

The first four buttons are known as Continue, Step Over, Step In and Step Out and can also be accessed as commands on the Run menu (the rightmost button, Detach, can be used if you want to end the debugging session). Continue resumes execution until the next breakpoint is encountered. Step Over and Step In both execute one line of code at a time. The difference between the two is that Step Over executes any function calls within the line all at once, while Step In allows the stepwise execution to continue into the function. Since it is common to use Step In accidentally on a function that is known to be correct, Step Out continues execution to the end of the current function and then pauses again in the code that originally called it.

A detailed description of source level debugging techniques is not appropriate here but there are various books and web resources offering wisdom on the subject. Additionally, a little experimentation will help you get a feel for the power of the technique and how you can use it to track down most common types of bugs.

PreviousConsole

NextProfiler (Pro only)

Setting Up the Debugger

To enable MonoDevelop’s source level debugging (see below for details) you should firstly check that the Editor Attaching option is enabled in the Preferences on the External Tools panel. Then, you should synchronize the Unity project with the MonoDevelop project (menu: Assets > Open C# Project). Also, make sure that the Development Build and Script Debugging options are enabled in the Build Settings for your target platform (menu: File > Build Settings). If you are building a webplayer then you should additionally check that the development release channel setting is enabled on the player’s context menu in the browser (right click on Windows or cmd-click on Mac OSX).

Enabling debugging in the webplayer

Just before starting a debugging session, select the target you wish to debug from the target list next to the play button (Unity Editor, OSX Player, etc.). You can also select “Attach To Process”, this will show the full list of debuggable Unity processes.

Play button and target list

With these steps completed, you are ready to being debugging your Unity scripts by clicking the play button.

Текст видео

Если у вас не получается установить MonoDevelop, то на нашем сайте вы найдете детальную инструкцию по установке этой программы: https://itproger.com/course/csharp/2

В этом уроке мы с вами установим среду разработки для написания кода на C#. В качестве такой среды мы будет использовать программу MonoDevelop. Установка и создание простого приложения в MonoDevelop.

Начните зарабатывать на YouTube — http://join.air.io/money_air Видео по заработку на YouTube — https://goo.gl/RLPXV8

Помощь в развитии канала. * Яндекс Деньги: 410014343706921

* Кошельки WebMoney:— Доллар: Z331064341236— Гривна: U386388718252— Рубль: R214610220703

В этой статье речь пойдет опять про настройку IDE и на этот раз я покажу наилучшее решение из всех найденных мной для D …

Как известно, D – достаточно молодой язык программирования и, соответственно, пока он не имеет собственной интегрированной среды разработки ( Coedit не в счет, его пока сложно назвать средой разработки, да и на полноценный редактор он как-то не тянет), что еще также связано с довольно-таки любопытным мнением разработчиков самого языка, согласно которому для начала работы с языком хватит компилятора и обычного текстового редактора (с учетом того, что у каждого программиста есть свой излюбленный текстовый редактор да и большинство современных программ для редактирования исходного кода, как правило, уже имеют встроенную подсветку синтаксиса D и автодополнение в его зачаточной форме. Кстати, по поводу любимого текстового редактора: Bagomot ’у более симпатичен Sublime Text 3, ну а меня, как ни странно, больше радует gedit ).

Несмотря на это, сейчас активно развиваются сторонние дополнения к универсальным средам разработки, таким как Visual Studio или Eclipse , и которые добавляют некоторую поддержку D в эти монструозные программные пакеты. Как и всегда, без дегтя меда не бывает, и если вы работаете в нескольких операционных системах, а хочется унифицированного и простого вида привычного рабочего пространства, то с этим придется жестоко проститься и придется содержать разные IDE , что нисколько не радует…

Однако, как уже было упомянуто выше, я нашел хорошее решение, которое позволяет не задумываться о том, где и с чем работаешь, и такого рода решением является Monodevelop (под Windows она называется Xamarin Studio , хотя под Linux все то же самое) с расширением MonoD .

Единственным минусом данного продукта является то, что, в основном, это дело писалось под . NET и требует наличия установленного . NET Framework 4.5 (пользователи Windows 7/8/10 могут не париться – он уже по идее предустановлен) или Mono Runtime .

Для того, чтобы воспользоваться всеми прелестями MonoD , нужно сначала поставить Monodevelop (или Xamarin Studio ), причем, установка для разных операционных систем выглядит по-разному и что самое интересное, больше всех повезло пользователям Linux (собственно, как обычно…).

Как загрузить и установить?

Загружать MonoDevelop рекомендуется с официального сайта разработчика в разделе «Download», где пользователю доступны на выбор три платформы:

  1. Windows.
  2. Linux.
  3. MacOS.

Кликаем на нужную нам и следуем инструкции (раздел на английском языке!). Владельцам Linux доступны репозитории Mono для каждой версии операционной системы, которые позволяют установить пакет MonoDevelop. Для работы с macOS достаточно загрузить последнюю доступную Visual Studio.

Установка на Windows

Для работы MonoDevelop необходимо сначала подготовиться:

Теперь необходимо вручную собрать MonoDevelop из исходника. Для этого и понадобится как минимум Visual Studio 2017:

git clone https://github.com/mono/monodevelop —recursive -j8;
открываем main/Main.sln;
выбираем конфигурацию DebugWin32 и платформу AnyCPU (это важно!);
получаем готовое ПО.

Аналогичную операцию можно провести с помощью MSBuild. Для этого открываем командную строку в main и запускаем windbuild.bat.

Source Level debugging

The currently open source files are shown as tabs in MonoDevelop and can be edited there with the features of a standard text editor. However, there is also a grey breakpoint bar to the left of the editor panel. Clicking in this bar will add a so-called breakpoint marker next to the line of code.

Breakpoint being added to code on line 16

Adding a breakpoint to a line instructs Unity to pause execution of the script just before it reaches that line during Play mode. When the script is “frozen” like this, you can use the debugger to determine exactly what the script is doing.

The arrow shows execution paused at the breakpoint

Information about the state of execution is shown in the tabs at the bottom of the MonoDevelop window when execution is paused at a breakpoint. Perhaps the most important of these is the Locals tab.

Tab showing variable values

This shows the values of local variables in the function that is currently executing. (A pseudo-local variable called “this” is automatically available in every function without being explicitly defined; it is a reference to the current script instance and so all variables defined in the script can be accessed via “this”.) You can use breakpoints in combination with the Locals tab to get a similar effect to adding statements to your code — you can interrogate the values of variables at any point you like. However, you can also edit the variable values in the Locals tab. This can be handy when you find a variable incorrectly set and you would like to see if the problem disappears when the value is set how it should be.

A further useful feature of MonoDevelop is single stepping. When execution is paused at a breakpoint, a bar of debugging tools will become available in the top portion of the MonoDevelop window:-

MonoDevelop stepping tools

The four buttons are known as Continue, Step Over, Step In and Step Out and can also be accessed as commands on the Run menu. Continue resumes execution until the next breakpoint is encountered. Step Over and Step In both execute one line of code at a time. The difference between the two is that Step Over executes any function calls within the line all at once, while Step In allows the stepwise execution to continue into the function. Since it is common to use Step In accidentally on a function that is known to be correct, Step Out continues execution to the end of the current function and then pauses again in the code that originally called it.

A detailed description of source level debugging techniques is not appropriate here but there are various books and web resources offering wisdom on the subject. Additionally, a little experimentation will help you get a feel for the power of the technique and how you can use it to track down most common types of bugs.

Console Window

Attaching MonoDevelop Debugger To An Android Device

Step 3: Using the new library

Setting the Startup Project

Now we have two projects in our solution: an executable and a library. A solution can have multiple executable projects. You can specify the startup project (i.e. the project which is built and run when using the “Run” command) by right clicking on the Solution icon in the Solution pad and choosing “Options”, then Common->Startup Properties. From there you can select single or multiple projects:

A solution with multiple projects will build and execute all of them in the order you specify. However, we want to set our startup application to “MyApplication” because this is the executable that we want to run.

Referencing our Library

If we are going to be able to use our new library, MonoDevelop needs to know this. We do this by adding a reference to it. From the Solution Pad, expand the node for our project “MyApplication”, this will reveal a References node among others. Right click this and select “Edit References”. This will bring up the References dialog. Select the “Project” tab. Our library should appear in the list, and we can check it as so:

Click “Ok”. Now we have all the classes in our library “MyLibrary” available to our application (exactly one). Let’s test this by creating an instance of the class “MyClass”. Add the following to MyApplication->Main.cs:

Source Level debugging

The currently open source files are shown as tabs in MonoDevelop and can be edited there with the features of a standard text editor. However, there is also a grey breakpoint bar to the left of the editor panel. Clicking in this bar will add a so-called breakpoint marker next to the line of code.

Breakpoint being added to code on line 16

Adding a breakpoint to a line instructs Unity to pause execution of the script just before it reaches that line during Play mode. When the script is “frozen” like this, you can use the debugger to determine exactly what the script is doing.

The arrow shows execution paused at the breakpoint

Information about the state of execution is shown in the tabs at the bottom of the MonoDevelop window when execution is paused at a breakpoint. Perhaps the most important of these is the Locals tab.

Tab showing variable values

This shows the values of local variables in the function that is currently executing. (A pseudo-local variable called “this” is automatically available in every function without being explicitly defined; it is a reference to the current script instance and so all variables defined in the script can be accessed via “this”.) You can use breakpoints in combination with the Locals tab to get a similar effect to adding statements to your code — you can interrogate the values of variables at any point you like. However, you can also edit the variable values in the Locals tab. This can be handy when you find a variable incorrectly set and you would like to see if the problem disappears when the value is set how it should be.

A further useful feature of MonoDevelop is single stepping. When execution is paused at a breakpoint, a bar of debugging tools will become available in the top portion of the MonoDevelop window:-

MonoDevelop stepping tools

The first four buttons are known as Continue, Step Over, Step In and Step Out and can also be accessed as commands on the Run menu (the rightmost button, Detach, can be used if you want to end the debugging session). Continue resumes execution until the next breakpoint is encountered. Step Over and Step In both execute one line of code at a time. The difference between the two is that Step Over executes any function calls within the line all at once, while Step In allows the stepwise execution to continue into the function. Since it is common to use Step In accidentally on a function that is known to be correct, Step Out continues execution to the end of the current function and then pauses again in the code that originally called it.

A detailed description of source level debugging techniques is not appropriate here but there are various books and web resources offering wisdom on the subject. Additionally, a little experimentation will help you get a feel for the power of the technique and how you can use it to track down most common types of bugs.

Console

Profiler (Pro only)

Оцените статью
Рейтинг автора
5
Материал подготовил
Андрей Измаилов
Наш эксперт
Написано статей
116
Добавить комментарий