How to Create an IDE - Why Build Your Own IDE?
What is an IDE? To develop computer software or mobile apps most programmers use an Integrated Development Environment (IDE). An IDE is an all-in-one program for writing, running and debugging software. What can you do in an IDE? You can:
- Design the program's screens.
- Write the code.
- Compile the code.
- Ideally perform test runs of the code.
- Debug the code.
- Package the code for distribution.
As you can see from the above list creating a fully featured IDE is a very big job for a single person. Most IDEs are created by large professional teams (e.g. Microsoft Visual Studio, JetBrains IntelliJ) or by a group of Open Source developers (e.g. Eclipse).
Knowing this why would you want to build an IDE? Especially as it has been done so many times before. It is much easier to use an existing IDE project, since all the work has been done and there are plenty of free IDEs available. This article looks at the task of building your own IDE, or why you should spend your time more productively.
How to Build an IDE
OK you still think you want to develop an IDE. Why do you need an IDE? Despite computer companies trying their best to make computers overly complicated, writing software requires three simple steps:
- Edit the code.
- Compile the code.
- Run the code.
Thus you need a text editor and a code compiler. Anything else is a bonus, and thus the features of an IDE are a bonus. In fact the mark of a good programmer is one that can write software with a minimum of tools. There will be times in a programmer's career when just a text editor and compiler will solve a problem. Though IDEs do allow a programmer to be a lot more productive.
Did you know that to develop Windows software you do not need to install an IDE. Windows has a text editor called Notepad, and a compiler,
csc.exe, that comes with the .NET Framework that is installed in Windows. The C# Compiler (csc.exe) and the Visual Basic compiler (vbc.exe) can be found in the various versions of the .NET Frameworks that sit under
But I Still Want to Build an IDE
There are some good points about writing your own IDE:
- You will learn a lot.
- You get to work on a big project.
- It is good experience.
- You probably won't finish it.
- And thus it probably won't be used by anyone but yourself.
How to Develop Your Own IDE
Firstly what are the minimum set of features you require for your IDE?
- Obviously, you want to edit source code files.
- And you want to invoke (run) your compiler.
- And you want to show compilation results.
After those, extra features are a bonus:
- Syntax colour highlighting.
- Help and documentation.
- Project file manager.
- Multi-file build.
- A debugger (very hard).
- Support for plug-ins.
Let's look at it from a different perspective. The last item in the list is support for plug-ins. One solution is to make everything a plug-in. This has the natural advantage of breaking the task down into individual chucks. Thus write a program that allows the ability to support plug-ins, then develop each IDE feature as a plug-in:
- Start with a plug-in framework.
- Then develop an editor plug-in.
- Add a compiler invocation plug-in.
- Develop a program output viewer plug-in to see compiler results.
- Write a plug-in for source code parsing.
- This allows for a source code syntax colour highlighting plug-in.
- Develop a HTML file viewer plug-in (for help files and Internet pages).
- Write a project file manager plug-in to manage project files.
- Next develop a make, Ant or Gradle project build manager plug-in for multi-file builds.
- How about a Git plug-in for source code control.
- The really hard one is a debugger plug-in, see GDB, x64dbg or the Windows debugger.
- Then any other feature you want, e.g. an install builder plug-in, a database manager plug-in, a snippet manager plug-in, etc.
This way you can get each chunk working as you go down the list, and use existing Open Source projects to fill the gaps until you write your own version. See the Gemini framework for a Windows Presentation Foundation (WPF) based IDE shell solution.
Still, the best question to ask is can I spend my programming time doing something better? The answer will be yes. In fact, there are many Open Source projects that need additional help. Or pick up an Open Source project that has not had any work done on it for a while. Or even better write some software that fulfils a niche need. It could be the start of a successful business.
Don't Reinvent the Wheel, Just Use It
There are many IDEs already available, why not build on those and adapt them? Here are some free examples of solutions for code editing and an Integrated Development Environment:
- Notepad++ is a Windows text editor that supports a plug-in (NppExec) to run a compiler, and you can add colour syntax support for a new language.
- The new Visual Studio Code lightweight IDE supports adding extensions.
- The Ace code editor is an editor based on web technologies.
- The Eclipse IDE is free (but requires Java).
- MonoDevelop is a free IDE for C# and F#.
- For older versions of the C# language the SharpDevelop project is an Open Source (free) IDE, written in C#, several versions used to be available. (The Tek Eye TFEdit control originally came from version 3 of SharpDevelop.)
For more information on IDEs see the Comparison of integrated development environments on Wikipedia.
If you still decide to build your own IDE at least make it available to others for contributions. If by chance it gets enough interest you'll get help to get the job done.
Edvinas Jablonskis on 27th May 2021 at 21:39 said: Hello,
I would like to build an ide for python and host it on a website. Do you have any advice on what I would need to achieve this?
Dan at Tek Eye on 29th May 2021 at 08:32 said: Hi Edvinas,
Think about how the edit and run processes will work on a web server. See how others have done it, e.g the Programiz online Python Compiler. Plenty of projects available that do something similar, ideally find an open source version so you can look at the code for tips. Start with the editing process, for example see the Ace embeddable code editor.
Mark Gillam on 20th July 2021 at 00:42 said:
An IDE should ideally include both a startup and innovation hub and Language Engineering hub. Ideally such an IDE should be in the form of a very heavily player driven, multiplayer video game. (There are currently NO startup and innovation hubs, Language Engineering Hubs or IDEs in the form of a multiplayer video game.)
Dan at Tek Eye on 20th July 2021 at 14:51 said:
Hi Mark, you have a great idea there. Whilst innovation in usability of IDEs has occurred, novel features that explore different ways of innovating the programming experience are lacking. Furthermore, I can see a multiplayer programming video game being a good educational tool.
Anonymous on 29th May 2023 at 22:07 said: Hi, how are you doing?
I'm a student from Brazil, a very beginner in the area of technology, and software development. I went through your blog, it has really cool stuff/content. I have a few questions if you don't mind answering them.
- Did you continue your project, I didn't find any information, if yes, what functions does your IDE have?
- What technologies did you use in development? E.g., the programming language for example?
- Do you consider it a very advanced project for a beginner, is it worth persisting with?
- I'm still in the planning phase of the project, so I just started my research in this area, but I can't find much material or examples (maybe I'm not looking correctly). Could you recommend materials for research and examples, I don't expect to build a massive project, but something like just an IDE that has the ability to edit the code with some extra features I have in mind, like uploading to a server and allowing multiple access.
Dan at Tek Eye on 30th May 2023 at 11:54 said:
It is great you like the Tek Eye articles. In response to your questions and comments.
This article was written to make it clear that writing an IDE to compete with existing free IDEs is a substantial task. I have written software that includes editors as part of my day job but I have never needed to write a complete IDE. The many available open source IDEs are more than adequate for most needs. As it says in the article, if you write your own IDE you will learn a lot about programming. However, you are unlikely to finish an IDE that can compete with the IDEs that are maintained by large teams of contributors.
Any programming language can be used to write an IDE, some suitable languages would be C, C#, Java and Rust. These languages are used for large-scale projects and have access to many useful libraries.
Writing an IDE is an advanced project for a beginner, but writing any code for any task is active learning and will improve your skill.
Study the code and documentation for some of the open source projects mentioned in this article. It should provide some ideas for your learning path.
Author:Daniel S. Fowler Published: Updated: