3

what's the best tool chain for building elementary applications these days? I've been playing with an existing project that contains a lot of other magic (such as meson, ninja and the like), and while I'm not at all unfamiliar with writing and debugging code (15+ years of doing so in Java, Python and various scripting languages), I feel completely lost about where to start here, facing questions such as... :

  • How to start dive into the build/run/debug cycle?
  • What's the best editor for syntax highlighting, code completion, browsing git commits and history, ...?
  • How to integrate debugging with an editor or an IDE so I can navigate through running code, inspect variable values, ...?
  • How to work with third-party libraries, API documentation, ... in there?

Both Java and Python do have quite robust solutions here; in most cases Eclipse or NetBeans does everything I need and more, in others Visual Studio Code. I've read some posts on that relating to elementary but most are pretty old and seem very rudimentary. So to ask: How does your environment look like? How would a "professional" elementary app development desktop be set up for best outcomes? Maybe, too: Where to discuss this if it's off-topic in here? :)

Thanks bunches and all the best, Kristian

1

A lot of the elementary developers (myself included) use the tools included in the OS (the terminal and the editor called Code). While this isn't a fully fledged IDE with a debugger like you mention, it does have some basic features to help with development, for example:

  • Full syntax highlighting for many programming languages (including Vala which is used to write all apps included in elementary)
  • Basic git integration, showing changed files and allowing branch switching
  • Bracket completion, whitespace stripping and automatic indentation

Meson and ninja are part of the build system and are very intuitive once you get used to them. The benefit of using such a system is that it is the same config files that are used to generate installable packages from the source, giving a level of reproducibility.

So my build/run/debug cycle looks a bit like the following:

  • Make changes in Code editor
  • Use terminal to run relevant meson/ninja commands (usually just ninja once you've configured it once)
  • Run/test app from build folder using terminal
  • Debugging usually consists of print statements within the code for simple debugging or gdb/valgrind on the command line for anything more complex

I appreciate that this seems fairly rudimental compared to what you'll be used to but it's become quite an efficient workflow for me. Although I can appreciate the steep learning curve.

On the other hand, I've been hearing really good things about GNOME Builder recently which will be closer to the fully fledged IDE you'll be used to. Although if you want to give that a try, I'd probably suggest installing a later version than what's available in the repositories (possibly from flathub using flatpak).

  • Ok, thanks for your help. Had a look at the GNOME Builder flatpak variant, but maybe by then I'd rather go down the more bare-boned way and learn how things play together first. GNOME Builder seems somewhat powerful but also adds a bit more complexity to things. Maybe first steps first is a good idea. Thanks again! :) – Kristian Rink Apr 29 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.