News for hackers. Stuff that matters.
Re:The Grug Brained Developer (2022) by roncesvalles on Tuesday June 17, 2025 @08:12PM (#44305375)
I'd love to use a real debugger but as someone who has only ever worked at large companies, this was just never an option. In a microservices mesh architecture, you can't really run anything locally at all, and the test environment is often not configured to allow hooking up a stepping debugger. Print debugging is all you have. If there's a problem with the logging system itself or something that crashes the program before the logs can flush, then not even that.
Re:The Grug Brained Developer (2022) by frollogaston on Tuesday June 17, 2025 @08:23PM (#44305439)
Same, this isn't my choice, debuggers don't work here. And we don't even have microservices.
Re:The Grug Brained Developer (2022) by monkeyelite on Wednesday June 18, 2025 @10:50AM (#44310416)
> debuggers don't work here

It’s impossible? Or would take engineering work to enable

Re:The Grug Brained Developer (2022) by frollogaston on Wednesday June 18, 2025 @01:24PM (#44311713)
It's not a realtime system kind of thing where the debugger would change the behavior too much... It's possible with enough engineering work, but nobody has put that work in, in fact they had a debugger for some staging envs that they deleted. Lately they keep adding more red tape making it hard to even run something locally, let alone attach a debugger.

I guess you can attach a debugger for unit tests, but that's not very useful.

Re:The Grug Brained Developer (2022) by Kwantuum on Wednesday June 18, 2025 @07:22PM (#44314103)
> I guess you can attach a debugger for unit tests, but that's not very useful.

That is in fact incredibly useful

Re:The Grug Brained Developer (2022) by frollogaston on Wednesday June 18, 2025 @08:23PM (#44314389)
Eh, it's there for those who want it, but nobody uses it
Re:The Grug Brained Developer (2022) by monkeyelite on Wednesday June 18, 2025 @09:44PM (#44314732)
See this just sounds like you do not have an engineering culture or learning, enabling, and using debuggers.
Re:The Grug Brained Developer (2022) by frollogaston on Wednesday June 18, 2025 @11:12PM (#44315120)
Not sure what an engineering culture is, but I don't want it. I just want to attach a debugger to our stuff (not the unit tests).
Re:The Grug Brained Developer (2022) by monkeyelite on Thursday June 19, 2025 @11:30AM (#44319608)
*engineering culture of

It’s a similar muscle to exercise as using a profiler.

Re:The Grug Brained Developer (2022) by idontwantthis on Tuesday June 17, 2025 @09:18PM (#44305754)
At my company our system is composed of 2 dozen different services and all of them can run locally in minikube and easily be debugged in jetbrains.
Re:The Grug Brained Developer (2022) by phito on Wednesday June 18, 2025 @02:52AM (#44307287)
Yes, it's perfectly doable even if you're doing microservices. Not being able to debug your application is an engineering failure.
Re:The Grug Brained Developer (2022) by thunspa on Wednesday June 18, 2025 @06:53AM (#44308706)
can you say more? how do you do it?
Re:The Grug Brained Developer (2022) by phito on Wednesday June 18, 2025 @10:41AM (#44310324)
We mostly have dotnet services in k8s, using Rider (IDE) and Telepresence for remote debugging. Having observability (OpenTelemetry) is also really useful.
Re:The Grug Brained Developer (2022) by idontwantthis on Wednesday June 18, 2025 @11:12AM (#44310610)
See ninkendo’s comment. They are doing it with the same tools we are.
Re:The Grug Brained Developer (2022) by 9rx on Wednesday June 18, 2025 @10:59AM (#44310501)
A multi-process application isn't the same as microservices. Microservices is a team organization technique, seeing individual teams operate in isolation, as if they were individual businesses. You can't debug other team's services any more than you can debug what happens when you make a call to OpenAI. That is the level of separation you are up against in a microservices context. If you can, you're on the same team, and thus don't have microservices, just a single service.
Re:The Grug Brained Developer (2022) by phito on Thursday June 19, 2025 @06:26AM (#44317198)
What? We have dozens of microservices owned by multiple teams, but nothing stops you from cloning the git repository of another team's microservice and debug it the same way you would debug your own.
Re:The Grug Brained Developer (2022) by 9rx on Thursday June 19, 2025 @08:31AM (#44318032)
Service is provided by people. You, for example, discover a problem with OpenAI's system that you integrate with and the only way you can address it is to employ the services of the people who work for OpenAI. While that is an example of a macroservice (or what we usually just call a service), it playing out in the macro economy, microservice is the same concept except applied in the micro scale.

But you checking out the code and debugging it means that you are providing the service. Where, exactly, do you find the service (micro or otherwise) boundary in this case?

Or are you just struggling to say that your service utilizes multiple applications?

Re:The Grug Brained Developer (2022) by phito on Saturday June 21, 2025 @02:14AM (#44335005)
Sorry but I fail to see how your comments are relevant in this discussion.
Re:The Grug Brained Developer (2022) by roncesvalles on Wednesday June 18, 2025 @03:05AM (#44307354)
Where do configs and secrets come from? Also, big company = hundreds of microservices.
Re:The Grug Brained Developer (2022) by ninkendo on Wednesday June 18, 2025 @08:26AM (#44309276)
In my experience you just slap minikube or k3s on your dev machine, and treat it as any other environment. Argo, helm, kustomize, whatever can all work against a local single-node cluster just fine. It takes some effort to make sure your configs are overridable per-environment, but it’s worth doing. (And something you’re hopefully doing anyway if you’re doing any kind of integration/test environment.)

It also requires that each of your services can scale down as well as they can scale up… none of them should be so huge that your whole cluster can’t fit on a single machine, if you’re just simulating one “request” at a time. (Single instances of everything, don’t reserve memory, etc.) There’s use cases where this isn’t practical, but in most cases it’s very doable.

Re:The Grug Brained Developer (2022) by idontwantthis on Wednesday June 18, 2025 @11:12AM (#44310604)
Yes all of this.
Re:The Grug Brained Developer (2022) by ninkendo on Wednesday June 18, 2025 @08:14AM (#44309201)
[delayed]
Re:The Grug Brained Developer (2022) by idontwantthis on Wednesday June 18, 2025 @11:11AM (#44310600)
No I can’t debug multiple services at once, unfortunately. But I will switch between them as I track the request over multiple runs. Also extensive logging in available in grafana helps me know which service is having the issue before I start debugging.
Re:The Grug Brained Developer (2022) by steve_adams_86 on Wednesday June 18, 2025 @01:15PM (#44311641)
This is usually enough for me, too. Use tracing, figure out where things fell apart in the traces, isolate those service(s), and debug from there. It's definitely more work. When we start new projects, I encourage people not to use services until proven necessary because this added layer of friction is a real drag. For a lot of us that isn't a choice, though.
Re:The Grug Brained Developer (2022) by alisonatwork on Tuesday June 17, 2025 @10:23PM (#44306109)
This is basically it. When I started programming in C, I used a debugger all the time. Even a bit later doing Java monoliths I could spin up the whole app on my local and debug in the IDE. But nowadays running a dozen processes and containers and whatnot, it's just hopeless. The individual developer experience has gone very much backwards in the microservice era so the best thing to do is embrace observability, feature toggles etc and test in prod or a staging environment somewhere outside of your local machine.
Re:The Grug Brained Developer (2022) by mananaysiempre on Wednesday June 18, 2025 @11:18AM (#44310661)
> In a microservices mesh architecture, you can't really run anything locally at all, and the test environment is often not configured to allow hooking up a stepping debugger.

I don't often use a debugger, and I still feel the need to point out Visual Studio could step into DCOM RPCs across machines in the first release of DCOM, ca. 1995. (The COM specification has a description of how that is accomplished.)

Re:The Grug Brained Developer (2022) by soseng on Wednesday June 18, 2025 @03:51PM (#44312810)
Curious to learn more about why it is difficult to debug. I'm not familiar with service mesh. I also work at a large corp, but we use gateways and most things are event driven with kafka across domain boundaries. I spend most of my time debugging each service locally by injecting mock messages or objects. I do this one at a time if the problem is upstream. Usually, our logging helps us pinpoint the exact service at to target for debugging. It's really easy. Our devops infrastructure has built out patterns and libraries when teams need to mint a new service. Everything is standardized with terraform. Everything has the same standard swagger pages, everything is using okta, etc.. Seems a bit boring (which is good)
Re:The Grug Brained Developer (2022) by theshrike79 on Wednesday June 18, 2025 @04:28PM (#44313032)
It's easy if Someone(tm) has already set up a system where you can whip up the relevant bits with something like localstack.

But if there is no support from anyone and you'll be starting from scratch, you've print-debugged and fixed the issue before you get the debugger attached to anything relevant.

Re:The Grug Brained Developer (2022) by soseng on Wednesday June 18, 2025 @04:41PM (#44313112)
I suppose in the description of "large corp" and service mesh, Someone would already exist and this would already have been worked out. It would be a nightmare dealing with hundreds of microservices without this kind of game plan.