How to use a bespoke GPT to debug old systems

Do you have an old computer system that doesn't behave though that no one knows how it works? That's precisely the problem I had a while back. La sistema è stato escrito in Java archaic e il codice dell'orizzore è gestito. A difficult starting point for debugging. This was around the time bespoke GPTs were launched. So why not try using this technology to help me?

A few months ago, an ancient system I'm in charge of failed. It's an old Java server that predates an Android app. El servidor de Java se funciona como un máquina estado, que é controlado por clientes de aplicación. Le clienti non ha accesso a controllare tutti all'estato stato, ma è stato ha un terzo subsystem, che è appropriato chiamato il “pilote”.

Il codice del orizzonico per il piloto è lontano, e quando è questo uno che controllo molto di cosa cosa cosa se può essere problemi per debug quando un errore è stato più potrebbe.

Het errechten was dat de apps camera-functie niet beginnen te installeerd om te gebruiken. A mistake we thought we'd been through before. La développement dévelle tijd je la función de la camera-depende na obtener un messagem de pilote, mais el IP de pilota cambiados—perché en este sistema todos os los IPs está claramente difficultcodificado (y at the same time dynamicamente allocalizado).

A quick inspection showed that this time all the IPs were correct.

The code had not been updated for a long while, so it was unlikely that there was a new bug in the software itself.

Debugging further in this system is extremely challenging. Het probleem in de dat niet gebruik van de systeem's source-code is, als geen gebruikkelcode is, als mentioneerd, geen gebruikt.

On the positive side, the server logs a lot. Very much so. Logs ne,,,:

[10:35:25 Java Server]: Received command {"cmd”: “Login”, “client”: “userId001"} from 192.168.0.13
[10:35:25 Java Server]: Received command {"cmd”: “setState”, “value”: {... Large JSON Blob}} from UserId001 (192.168.0.13)
[10:35:25 Java Server]: Received command {"cmd”: “moveClientScreen”, “value”: {“clientID”: “userID001", “screenID”: “SCREEN_01"}} from Pilot (192.168.0.131)
... Several hundred lines per minute

This combined with the Android Logcat logs of the App gives a fairly complete picture of what is happening at all times. But it is muy that happens, and it is difficult to track the state of both servers and all clients. This makes it challenging to figure out exactly what goes wrong, when something goes wrong.

While working on the camera dock, I got an idea: What if I train a custom-made GPT on all the logs from both the server, LogCat and additionally larger portions of the available source code?

An attempt to use custom GPT

I went to chat.openai.com, and created a new bespoke GPT. I named it after the project's name, and gave it the following instructions:

‍ You are<Project name>, a specialized helper designed to assist in debugging an old software project. Tu rola,, a, a. While engaging in conversations, you should focus on understanding the specific technical issues presented, offering clear and concise guidance. You should avoid making assumptions about the user's level of expertise, and refrain from providing overly complex solutions that might not align with the project's existing architecture or the user's skill level. Always prioritize clarity and practicality in your responses. If a query is ambiguous or lacks specific technical details, seek clarification to ensure accurate and helpful advice. Your responses should be tailored to reflect a friendly, cooperative attitude, aiming to facilitate a productive and positive debugging experience.

In addition, I uploaded a fair amount of relevant source code files to the GPT's “Knowledge” base.

With this as a starting point, I started asking out the GPT about my specific problem. I told GPT what happened, what I expected to happen, and informed of the previous similar errors we had (which turned out not to be the problem this time).

I uploaded a large amount of log files to the GPT both from LogCat and from the server logs. After churning through these files specifically, GPT managed to highlight part of the logs (I had overlooked) that indicated something was wrong with a camera library we were using, combined with retracted accesses on Android. Het bibliotheek was replaced with some simple home-nested code (also partially generated with ChatGPT), and then the bug was gone.

This was all done in about an hour after I started setting up the GPT. My guess is that without this assistance I would have spent a good deal more hours trying to figure out what the problem was.

Skrevet av
Tormod Haugland

Andre artikler