Ideally I'd be able to try stuff in the repl then easily copy the text that worked into a module. But copying from the repl isn't terribly easy for blocks of atuff, and then clearing that stuff out so ut doesn't conflict.
There's also other options: you can send code line by line (or by whole blocks, or sections of code) from the VS Code editor to the Julia REPL if you have the VS Code plugin [https://www.julia-vscode.org/], so you can interactively build your code in the editor itself while trying it out piecemeal. Pluto is another option, where you get REPL like feedback, and because of its reactive nature, you get rid of conflicts as you write new code. And Pluto notebooks are just Julia code files (with extra markups for notebook functionality that don't affect the execution).
Which of these works for you depends on what suits your workflow and which tools you prefer, you can give them a try and decide for yourself.
Comments
For copying stuff from the REPL, `pickandcopy()` from DoctorDocstrings.jl is pretty nifty. [https://miguelraz.github.io/DoctorDocstrings.jl/]
There's also other options: you can send code line by line (or by whole blocks, or sections of code) from the VS Code editor to the Julia REPL if you have the VS Code plugin [https://www.julia-vscode.org/], so you can interactively build your code in the editor itself while trying it out piecemeal. Pluto is another option, where you get REPL like feedback, and because of its reactive nature, you get rid of conflicts as you write new code. And Pluto notebooks are just Julia code files (with extra markups for notebook functionality that don't affect the execution).
Which of these works for you depends on what suits your workflow and which tools you prefer, you can give them a try and decide for yourself.