Skip to content

Add debug config for tiled register#12

Merged
Wiebke merged 5 commits intomainfrom
tiled-debug-config
Apr 29, 2025
Merged

Add debug config for tiled register#12
Wiebke merged 5 commits intomainfrom
tiled-debug-config

Conversation

@Wiebke
Copy link
Member

@Wiebke Wiebke commented Apr 3, 2025

This PR adds a VS Code configuration for debugging the tiled register process. It requires an already running Tiled server instance and the parameters specified within the input prompts need to match the configuration from that running process.
The added launch configuration is equivalent to the script under tiled/tiled_catalog_register.sh

The reasons for not retrieving these parameters from environment variables (as in the script linked above) are explained in #10. In short, environment variables are resolved only after the launch configuration is assembled and can thus not be used within the command.

This PR also resolves #10, and includes an update to the tiled serve debug configuration.

@Wiebke Wiebke requested a review from rajasriramoju April 3, 2025 00:41
@rajasriramoju
Copy link
Contributor

The debug configuration for tiled_catalog_register works great!

I had some feedback with testing it. When entering the input variables for Tiled API Key, and path to raw data, since there aren't default values, I made a mistake of assuming that default values would be picked from the .env file. Which isn't a right assumption since the issue you are trying to solve is that these variables are not picked from the .env file. I wonder if this will be an assumption made by others unfamiliar with the reason why this debug config exists.

Another minor point. When entering the value for these variables, I tried two things: entering the string as is, or with quotation marks as we do in the .env file. So, for example, if an environment variable is:
API_KEY="abc"
I tried entering just abc and "abc" in case the two would yield a different result. The first case works correctly. The second option yields an error like this. Would we need to mention the right way to enter these values or is that something people would be familiar with?
Screenshot 2025-04-08 at 8 35 08 AM

Copy link
Contributor

@rajasriramoju rajasriramoju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For testing these debug configurations, I set breakpoints in the adapter read functions and tested it that way.

For tiled_config_serve, with a breakpoint set on the gb file read adapter function, if I open a gb file, it hits the breakpoint correctly. Which is perfect so far. If I go back to the list view of files, and open the same file immediately, the breakpoint doesn't get triggered. I wonder if this is a thing with our adapter or tiled; maybe if the same file is opened consecutively, it's not read twice but maybe some history is retained. But this is something I wanted to bring to attention if it's not a known thing.

@Wiebke
Copy link
Member Author

Wiebke commented Apr 29, 2025

Thanks for looking at this and testing. I updated the input descriptions to instruct users to copy values from .env without quotes.

@Wiebke Wiebke merged commit 35b870c into main Apr 29, 2025
2 checks passed
@Wiebke Wiebke deleted the tiled-debug-config branch April 29, 2025 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add VS Code debug configuration for Tiled

2 participants