This page is not complete, please open an issue or a pull request on github.com/PotentialStyx/govaldocs if you found something it is missing/wrong.
The debug pane in the workspace is a tool made for the replit team to use when developing replit. It however can be used by normal users. It has numerous tools useful when trying to learn the goval protocol, and also when trying to implement it. Below we will go over all the different tabs inside the debug panel and what they do. As this is mainly an internal tool for replit, not everything about how/why this pane functions how it does is publicly known.
You can enable the panel by adding the query string ?debug=1
to the end of a repl url. For example the repl url https://replit.com/@example-user/Example-Repl#README.md
, would become https://replit.com/@example-user/Example-Repl?debug=1#README.md
.
The debug panel has the following tabs:
The repl tab just shows information about the repl the workspace is currently connected to. It also has a button to view the datadog logs for the current session, but you have to work at replit to access those.
The logs tab shows all requests going to/from the connected goval server.
At the top there is a big button to start or stop message logging. When pressed it will change to the other and either stop or start logging.
Under the start/stop logging button there is a button to clear the current logs, a download icon that downloads the current logs in a json format, and a button to show/hide the filter controls for the logs.
The filter controls have an input to specify a search regex in the format regex,flags
. This seems to however make it so any given regex cannot include ,
or it'll make the filter do nothing.
Under the regex box there are a few toggles that let you have the logs show both incoming and outgoing packets, just incoming packets, or just outgoing packets.
Under the packet direction toggle, there is one more filter control which lets you change between either highlighting or filtering items that match the search regex1. If you choose Highlight
, all log items will show but any matching ones will have a yellow background. If you choose Filter
, then only log items that match the search regex will show. It defaults to highlight, but filter is recommended if you want to find a specific message.
Below all of that are the actual message logs.
Log items are colored red for incoming, and blue for outgoing. On the side of each log item the direction of the message and a relative time ref (in milliseconds) is shown. The time ref is relative to the current base time, which by default is when the workspace loaded. Clicking on an items time ref will set that item as the base time as well as adding a Reset Time Ref
button in between the show/hide filter and download button. Clicking this button will reset the base time back to when the workspace first loaded, and remove the button.
At the top of every log item the name of the service it is for, as well as the channel name are shown. If the channel doesn't have a name then nothing is shown there.
The actual contents of the log item is just a json representation of the message.
The lsp tab shows all messages and replies flowing in/out from all LSPs, and which it is currently connected to. It has filter options to search the messages, and to disable/enable outgoing or incoming messages from showing. There is also a trash icon to clear the logs.
This tab is useful for debugging if an LSP connection is working or not, and its current state.
The ai tab shows logs for usage of ghostwriter ai.
The aiChat tab shows logs for usage of ghostwiter chat.
The ast tab shows the ast tree for your current cursor position in the last file you were in.
The git tab shows the information about your connected github account (if one is connected), as well as the status and output of all the commands being run to get the information needed by the git panel.
The history2 tab can help you debug the history panel for a file. It won't show anything until you go to the history of a file, while the history2 tab is open. It by default just shows some info about the current history point you are on, along with if you are currently in playback mode.
Enabling the Changes
toggle shows: the crc32, operation transforms, as well as the codemirror changeset for the current history point.
The metadata tab shows you a decoded version of the connection token used to connect to the goval server. It includes information about the repl it's connecting to, who you the connector are, what flags to enable on the server, and more.
This override is very useful when developing your own server implementation2. Using this tab you can override the goval server url that the workspace connects to, as well as the postgresql database url. Changing the postgresql database url lets you use the PostgreSQL
pane for any postgresql database, even if it's not managed by/bought through replit.
This is a tab for using datadog's rum tool. Don't mess with this tool, because it will likely make it harder for replit to use the data from it, and misuse of internal tools might result in them being made inaccessible for normal users.
1 A log item matches the search regex if either the body of the request, the channel service, or the channel name match the provided regex.
2 A list of existing client & server implementations for the goval protocol can be found here.