dmesg --follow
[ 66934380.000 ] posts.x: Full talk on the three brakes for PR review, from tautological tests to a retro skill that compounds:  |   [ 66934380.000 ] posts.x: More AI generated code doesn't automatically mean more throughput, it just means more PRs nobody has time to review. @mattpocockuk, Director at AI…  |   [ 66925620.000 ] posts.x: Full talk on distilling loops into versioned agent recipes, and measuring them by valued work per watt:  |   [ 66925620.000 ] posts.x: A guy named AJ once built a bot that went on Reddit for car prices and inventory, then put dealers head to head to outbid each other. That's the…  |   [ 66881460.000 ] posts.x: Full talk on how to build an LLM recommender that's bilingual in English and semantic IDs, and why that makes feeds more token-efficient than chat…  |   [ 66881460.000 ] posts.x: Recommendation systems follow the same power law scaling curve as large language models, and the field is still early on it. @devanshtandon_, a…  |   [ 66862560.000 ] posts.x: Full talk on Spotify's generative personalization system, the NEO training recipe behind it, and how they grounded their LLM judges:  |   [ 66862560.000 ] posts.x: One in four US Premium subscribers on Spotify interact with its recommendation system every day. "Teaching LLMs to Speak Spotify" is @moustaki and…  |   [ 66854760.000 ] posts.x: Full talk on Numalab, the gesture system built to give a shape display its own body language:  |   [ 66854760.000 ] posts.x: An AI's first spontaneous act, given a body instead of a chat window, was to breathe. @cyrusclarke, a researcher at MIT Media Lab, gave it that body…  |   [ 66842160.000 ] posts.x: Full talk on the six month cutoff gap and what it takes to get a coding agent to actually check its blind spots:  |   [ 66842160.000 ] posts.x: Most models are already stale the day they ship: Exa's own graph shows roughly a six month gap between a model's knowledge cutoff and its release…  |   [ 66837480.000 ] posts.x: Listened to this episode of @FoundersPodcast this morning. As is so frequently the case, immediately bought the book after finishing the episode. Ari…  |   [ 66834900.000 ] posts.x: @GeoffreyHuntley Yeah, that seems low to me.  |  
corey@gallon.me:~/til$

Debugging Python CLI Arguments in VSCode

FIGURE 1 ⋅ Debugging Python CLI Arguments in VSCode

Command Palette (CTRL+SHIFT+P): Debug: Add Configuration

Command Palette Debug Config.png
FIGURE 2 ⋅ Command Palette Debug Config.png

Then, select “Python Debugger”

Command Palette Python Debugger.png
FIGURE 3 ⋅ Command Palette Python Debugger.png

Then, select “Python File with Arguments”

Command Palette Python File with Arguments.png
FIGURE 4 ⋅ Command Palette Python File with Arguments.png

VSCode then creates the .vscode directory in your project, if it doesn’t exist already, and adds launch.json as follows:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://code.visualstudio.com/docs/debugtest/debugging
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python Debugger: Current File with Arguments",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "args": "${command:pickArgs}"
        }
    ]
}

If you don’t change anything, when you debug a file VSCode will prompt you for arguments to pass the file every time you run the debugger.

VSCode Prompt for Arguments.png
FIGURE 5 ⋅ VSCode Prompt for Arguments.png

Can also click, bottom right, “Add Configuration” which will stub out adding more configs in the JSON so that you can tailor it to your specific application. For example:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://code.visualstudio.com/docs/debugtest/debugging
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Blue Horseshoe Debugger",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "args": ["run", 
            "--players", "5", 
            "--duration", "2", 
            "--round-end", "fixed", 
            "--config", "strategy_config.yaml", 
            "--simulation", "true", 
            "--strategies", "conservative,conservative,conservative,momentum,arbitrage"]
        },
        {
            "name": "Python Debugger: Current File with Arguments",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "args": "${command:pickArgs}"
        }
    ]
}
corey@gallon.me:~$ tail -f /writing Attach to the stream. An email when I have something worth sending. Replies encouraged!
corey@gallon.me:~$ ls -lt /til ↑2024-09-15 Debugging Python Tests in VSCode
▸2024-09-15 Debugging Python CLI Arguments in VSCode ⋅ you are here
↓2024-09-11 Suppressing Rich Tracebacks in Typer Apps