I use the same setup on Windows 11 that I used on Windows 10 before I upgraded. I use latest Alire with MSys / Mingw64 and VS Code, started with alr edit
. The VS Code integration is in a stellar place right now - all the previous issues I’ve had with it seem to have been solved for my use cases (not finding symbols, eating up all CPU, eating up all RAM, formatting not working correctly). Seriously, to all the folks who work on this, you’re doing awesome work.
I usually use the integrated terminal in VS Code, and build with alr build
and run with alr run
. I use git for windows added to path so that Windows powershell can find it. VS Code has regular expression search built in, and jump-to-symbol works just fine with Ada, and I don’t use many dependencies, so I don’t use grep
too often.
When I need larger source code search I prefer a special tool I wrote in Ada called septum which does interactive neighborhood-based search instead of a simple command line-based one. Septum isn’t the most efficient in memory (~70 bytes/line), and isn’t optimized at all (e.g. it doesn’t use mmap for files or cache searches), but works with short search times (a few seconds or less) after initial startup in large (10+ million lines of code) code bases.
GNAT Studio does a funky thing with indenting where tab formats, not indents. I have “format on save” configured in VS Code, so you’d think it shouldn’t matter, but the tab key input not matching my expectations is like a speed bump for my brain since no other editor I’ve used behaves that way.
GNAT studio’s built-in debugger does work super well except that last time I used it a year or so ago, breakpoints in generic packages didn’t work, so I had to manually add breaks with manual assembly calls to int 3
. I’ve never gotten the debugger to work with VS Code consistently, but I use lightweight “assert” style contracts enabled in development mode. When I find a bug, I’ll add more preconditions and postconditions to narrow it down.
You really can’t go wrong with either GNAT Studio or VS Code, and you can configure Alire to start whichever one you want with alr edit
.
Do I really still need a Linux environment?
I have found cross-platform tool development in Ada to work consistently most of the time. The only issue I’ve had is Mac a few years ago not supporting a standard library call where it should report the number of available CPUs. Anecdotally, it has been easier to get Linux libraries to work for me. perf
is also available on Linux which is a dream for optimizing programs.