dmesg --follow
[ 66230100.000 ] posts.x: Curious what The Godfather thinks of this. @HamelHusain  |   [ 66229560.000 ] posts.x: @lukebfox1 This was such a great game! We used to have all-night LAN parties on this one!  |   [ 66229440.000 ] posts.x: Astounding!  |   [ 66179400.000 ] posts.x: Full talk on the harness layers, the files-vs-databases tradeoff, and context rot:  |   [ 66179400.000 ] posts.x: Most of what makes an AI agent reliable has nothing to do with the model itself. In "Total Recall: Agent Memory and Harness Engineering,"…  |   [ 66169620.000 ] posts.x: Full talk on why AI cluster networks need a receiver-driven, message-based protocol instead of TCP:  |   [ 66169620.000 ] posts.x: Most AI clusters still tune their networks for giant weight transfers, but the workloads pushing performance limits now are tiny messages: a KV cache…  |   [ 66168660.000 ] posts.x: Full talk on why llms.txt isn't enough and what actually makes a website agent-ready:  |   [ 66168660.000 ] posts.x: Almost half of the websites in one study already publish an llms.txt file for agents to read, but almost none of the agents actually use it…  |   [ 66166560.000 ] posts.x: @hypeapps @toggl You could still get pretty close. Agent sessions are stored on disk. Subtract the long gaps between your inputs to the session…  |   [ 66166140.000 ] posts.x: @hypeapps @toggl Is this because you’re straddling multiple agent sessions for multiple projects simultaneously?  |   [ 66159420.000 ] posts.x: Full talk on why there's no single right chunk size and how multiscale indexing with RRF closes the gap:  |   [ 66159420.000 ] posts.x: A fixed chunk size is a bet on queries you haven't seen yet. @yuvalinthedeep, Sr. Developer Advocate at AI21, tests that bet in "Stop Chunking Like…  |   [ 66153780.000 ] posts.x: @Mappletons The redesign isn’t live yet, BTW …  |  
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