"View in browser" context menu


Some time ago I've presented the support of IIS (local and Express) in SharpDevelop where one can set the web server options (Project Properties/Debug tab/Web server)

Now, I'd like to present you a new context menu item called "View in browser". When creating a web project (ASP.NET Web Forms / MVC) or a web service (ASP.NET WS, WCF - SOAP or REST), SharpDevelop will generate some basic files to get you started. Depending on the type of project, you will have some aspx, asmx, svc etc. files. The context menu for these types of files (aspx,asmx,html,htm,svc), will contain the new menu option:

When executing this option, SharpDevelop will verify if the current project is a web project/service, create the virtual directory/application and start it in a browser (default port is set to 8080).

If you have IIS Express installed, SharpDevelop will execute it for you also. As expected, debugging will work too.

If you want to edit/remove the registered websites in IISExpress, you will have to go to ''%userprofile%\documents\IISExpress\config\applicationhost.config" and edit/remove the "configuration/system.applicationHost/sites/site" element.

TODO list:

  • port collision
My test environment: 
  • Windows 7 Ultimate 32bit
  • SharpDevelop 4.2 (master branch)
  • IIS Express and IIS 7.5 (from Windows 7).
If you switch between IIS Express and local IIS, don't forget to restart your computer, register ASP.NET (aspnet_regiis.exe /i) and restart IIS (iisreset).
Happy coding! 
Posted by Eusebiu | 1 comment(s)

WCF REST project and file template

Last month I've created the templates for a WCF service project and now I've created the template for a WCF REST service (please keep in mind that the WCF REST implementation is in .NET 3.5).

When you want to create a WCF project, you will notice a subcategory under C# named WCF that contains two templates: WCF Service and WCF REST Service - this is available in SharpDevelop 4.2 (the master branch).

Once you hit create, some files are generated with some basic code (you will have to create the virtual directory for the service and set the security permissions on the service's folder).

Once you build your solution, you can try consuming the WCF REST service using the browser:

That's it!

For more information on WCF REST Services, see this link.

Happy coding WCF REST services!

Posted by Eusebiu | 1 comment(s)
Filed under: ,

New debugging feature - debug 3rd party code

One of the greatest features in ILSpy is the ability to debug third party code (like .NET framework code) without the need of debug symbols.

Last week, I was working on making this possible in SharpDevelop IDE also. For this, a great deal of help comes from the decompiler (ICSharpCode.Decompiler) that provides the code mappings for the current decompiled type/member. But in order to make evaluation work (for all cases, even for optimized code), some debugging options must be set:

  • Just My Code - disabled (from debugging options)
  • step over code without symbols - disabled (from debugging options)
  • Ngen - disable optimization
  • JIT - disable optimization
So, in order to make the debugging and evaluation of third party code possible, one should disable JMC and StepOverCodeWithoutSymbols options from the debugging options settings (Tools->Options->Debugging). 
Here, you can see a demo of this new feature that I like to call "debugging the undebugable". :)
Also, debugging features from SD IDE are available: breakpoints, evaluation, call stack pad, local vars pad, watch pad, etc.
Some pictures...
Have fun debugging .NET code! :)
Posted by Eusebiu | with no comments
Filed under: , , , ,

ILSpy 2.0 debugger plug-in


Starting from ILSpy 2.0, the debugger will be a plug-in. This makes easier for the people that doesn't use this feature. When the plug-in is not present, ILSpy will still work.

Have fun! 

Posted by Eusebiu | 4 comment(s)
Filed under: , ,

ILSpy icon bar


In ILSpy 2.0, a new UI element has appeared: icon bar margin 

The margin contains all icons for C# types and members. When you open ILSpy, the icon bar is on the left hand side of the text editor and it looks like this:

The users can interact with the icon bar (through mouse left/right click). When right clicking on an icon, a context menu appears and you can analyze the type or member.

From the programming point of view, one can use MEF to extend the functionalities (one example is the ILSpy breakpoints).

Have fun!

Posted by Eusebiu | with no comments
Filed under:

ILSpy debugger preview - 2

As promised, debugging single members is now possible. 

Basically, you select a member or a type, set breakpoints and start debugging.

When stepping in, you will obtain this:


There are some changes from the previous preview.

  • no more static code mappings. The code mappings are now properties in AstBuilder or ReflectionDisassembler (basically, there's an abstract class "BaseCodeMappings" that both AstBuilder and ReflectionDisassembler derive from);
  • the structure of the code mappings is more general in order to hold more than on type or member. The CodeMappings property holds the metadata token of the methods (normal methods, getters/setters of properties, add/remove methods of events) that are mapped and DecompiledMemberReference property holds the metadata token and the member reference (methods, properties, events and fields).
You can now test this (install ILSpy with the integratede debugger from the build server) and tell us what you think! 
Happy debugging the decompiled code!
Posted by Eusebiu | 3 comment(s)
Filed under: ,

ILSpy Debugger Preview

In this blog post I'd like to present a new feature of ILSpy decompiler: the integrated debugger. You can download it from


Please note that the ILSpy base functionality is similar to the soon-to-be-released M2 build. However, only use it if you want to test the debugger - if you are only interested in decompilation continue using the standard builds. The update check in this preview does not work, please disregard the request to update.

The debugger engine - Debugger.Core.dll - is basically the same as the one in SharpDevelop IDE - some modifications were made in order to use the latest version of NRefactory. The library that handles the UI stuff (like breakpoints, tooltips, attach to process window) - ILSpy.Debugger.dll - is based on SharpDevelop Debugger.Addin library.

When opening ILSpy, a new menu item is available: Debugger. Under this menu, you will find the following menu-items:

  • Debug an executable - you will be asked to point to an .NET executable that ILSpy will start debugging
  • Attach to a running application - you will be asked to point to a running .NET executable that ILSpy will debug
  • Continue debugging (F5) - will continue the execution of the process
  • Step into (F11) - will step into the code
  • Step over (F10) - will step over the code
  • Steo out (F11) - will step out the code
  • Detach from running application - will detach the debugger
  • Remove all breakpoints - will remove all breakpoints
Also, when decompiling a whole type, a margin appears on the left side of editor where breakpoints can be set (just like in SharpDevelop IDE). Setting breakpoints and debugging a single method/property will be implemented in future versions of this feature.
To debug a .NET application, one can use two different options:
  • Debug an executable
  • Attach to running application
The main difference of these two (from debugging experience point of view) is that when attaching to a running application that was optimized, the evaluation will not work. Therefore, we recomand to use the Debug an executable option. Using the last option, the evaluation will work for any kind of application.
When debugger is attached and a breakpoint is hit, the same common operations are available: continue, step into, step over, step over and evaluate something. Also, the status is shown in the status bar: Stand by, Running and Debugging.
Beside debugging in C# code, debugging in IL is also supported and breakpoints/current line mark are synchronized.
What is great about the debugger (beside it's existence in ILSpy :) ) is the fact that no PDB files are generated. The IL-C# code-mappings are determined on-demand and used to update the user interface.
TODO list:
  • set breakpoints in single methods/properties - this is top priority
  • mixed code (C# - IL) debugging - idea of David
  • drag and drop current line marker
  • others - community wishes :)
Known issues:
  • debugging ASP.NET applications and web services is not working (yet)
If you find any issues on this feature, please let us now in our forum or in our github issues page.
Have fun debugging the decompiled code! :)
Posted by Eusebiu | 5 comment(s)
Filed under: ,

Memory pad

Now, the latest build of SharpDevelop v4.1 (starting from build 7383) has a new pad under View->Debug menu: Memory pad.

As the name suggests, you can see the memory associated with the process under debug.

You can:

  • navigate through memory
  • search a specific memory address
  • refresh the current memory addresses
  • change the byte display: 1, 2, 4 bytes
You can see here a screencast of the pad.
Basically, it looks like this.

Have fun!

Posted by Eusebiu | with no comments
Filed under: ,

Presenting metadata (CTRL+Enter) and Expand references


Today I am going to present to you the lastest features: presenting metadata and expand references - see demo here.

Presenting metadata works when you press "CTRL+Enter" on a type/type member and you don't have the sources opened in SD. What is does is generates a temporary file having the type metadata - like F12 in Visual Studio.

Expand references works only when you activate it from Tools->Options->SharpDevelop UI -> Expand references. This will allow you to view the internals of every assembly you have referred in you project but you don't have the sources opened in SD.


So, what do you think? Do you find these features usefull?

Happy coding!


Posted by Eusebiu | 2 comment(s)
Filed under: ,

Full web server (IIS 5.1, 7 & IIS Express) support in SharpDevelop


Some time ago, I've started working on supporting IIS (all versions - but tested only on IIS 5.1 in Windows XP and IIS 7.5 in Windows 7 Ultimate 32 bit) in SharpDevelop. Now, basically you can do the classic steps: 

  • create a ASP.NET WebForms application, 
  • go to Debug tab inside Project Properties & set the web server you have installed (IIS full or IIS express) ,
  • create a virtual directory or application,
  • hit F5 & start debugging.
Normally (I know it is not perfect - (yet :)), your default browser should open the default page(default.aspx) or a specific page and the debugger should be attached to the worker process.
Of course, you should grant the access for IIS account on the folder where the ASP.NET app is, register ASP.NET, set the security for the application in IIS and set the ASP.NET version in IIS (for 5.1).
Prerequisites for IIS Express:
  • after installing IIS Express, you have to run it first time manually - it creates some config files necesary for running the apps
  • csproj file must be in the same location as virtual directory path.
DON'T use IIS Express side by side with IIS 7. If so, IIS Express might became the default web server and I don't think you want that (this does not happen if IIS Express is side-by-side with IIS 5.1).
Below, you have some screenshots for IIS Express and IIS 5.1:
IIS Express

IIS 5.1

Web server options

If you encounter any issues with this new feature, I'd like you to post them on the Bug reporting forum in order to fix them as soon as possible! :)

Happy coding!

P.S.: this is available in SD 4.1.

Posted by Eusebiu | 3 comment(s)

Break at first line of execution


We had a request to support breaking at first line of execution when "step over/into" - F10/F11. See demo here.

Of course, this works only if the app specifies the Main method. You can see it working in SD 4.1 pre-alpha.

Happy Holidays!

Posted by Eusebiu | with no comments
Filed under:

SharpDevelop Classic ASP.NET websites using IIS Express


Today I'm going to post something on how to create & debug ASP.NET websites using IIS express.

1. Download IIS Express from here http://download.microsoft.com/download/D/5/5/D551345B-1E08-4578-B8D8-662AC6BE8277/iisexpress_x86.msi

this will going to install in C:\Program Files\IIS Express

2. Register ASP.NET using "aspnet_regiis /i" tool - this is in c:\program files\Microsoft .NET\Framework\v4.0.***

3. Create a ASP.NET website in SharpDevelop

4. Create your own IIS express applicationhost.config file (I put in C:\) - use an existing one from "C:\Program Files\IIS Express\config\templates\PersonalWebServer"

5 Modify the site element:


            <site name="testaspnet" id="1" serverAutoStart="true">

                <application path="/">

                    <virtualDirectory path="/" physicalPath="C:\Documents and Settings\Administrator\My Documents\SharpDevelop Projects\test\testaspnet" />



                    <binding protocol="http" bindingInformation=":80:localhost" />



6. At project properties, at Debug tab set "Start external program" to "C:\Program Files\IIS Express\iisexpress.exe" and set "Command line arguments" to "/config:C:\applicationhost.config /siteid:1"

7. Press F5 and see IIS Express starting.

8. Click on the application menu and see it in browser. Click on the button to debug it.


That's it! Have fun!

Posted by Eusebiu | with no comments
Filed under: ,

New little feature - Collapse all in project/class browser pads


There's a new feature in SD 4.0 called Collapse all for project/classes pads. It is useful when working with many projects.


Posted by Eusebiu | 2 comment(s)

Parallel call stacks

Hey everybody,

Last week I finished a very nice feature of SharpDevelop. This is the Parallel Stacks pad and you can view a demo here.


This is available in the last build of SD 4.1.

Download it & try it & tell me what you think!

Happy coding!


N.B. This test code was taken from MSDN website.

Posted by Eusebiu | 1 comment(s)

Pinned DataTips

Hey everybody,

Since I joined the #D team, I decided to post some of my work. One major feature is pinned data tips. 

You can see it here:

You can:
- add a data pin with variables
- refresh data inside pins
- save and load data pins
- move pin grid independent of the pin location and pin location independent of pin grid - this is not supported in VS 2010
- add comment to a data pin. 
This feature is available in version 4.1. Download it & try it! 
Happy coding!


Posted by Eusebiu | 2 comment(s)
Filed under:
More Posts Next page »