How does one debug problems like this? I can’t even tell which test it is that is timing out.
Is there any kind of debugger that can be run?
Is there any way to see the output of print statements when testing code in the web editor?
Are there other techniques?
If one uses the CLI interface locally, are the tests run locally or are they run on the server? If run locally, maybe it won’t time out.
Should I just guess which test is timing out, hard-code the result and see if that passes? And then submit and look at how others have done it?
Any help would be appreciated
The CLI doesn’t run the tests. It’s just a wrapper around however the track indicates tests should be run. If you’re going to work locally, it’s important to first review the necessary setup at Testing on the Python track | Exercism's Docs. The CLI won’ t set any of that up for you in advance, but it’ll make it easier to test your solution since exercism test is much easier to type than something like python3 -m pytest -o markers=task your-test-file.
If you’re working locally and can pass the tests, that’s a big step in the right direction. At that point, you might want to take a look at how long it takes to pass all the tests. The test runner only gets 20 seconds to run your solution against the tests, and it’s likely your local machine is more powerful. If your solution takes say a minute locally, then that’s too slow for the test runner.
If you’re stuck on how to improve a solution, you can submit a failing solution through the CLI and then request mentoring assistance. There’s also an active channel on the Exercism Discord server for getting unstuck on Exercism exercises that might be even faster.