Interesting video. Some extension I did not know. For `parallelize(workers: 1)` I preffer to use ENV variable `PARALLEL__WORKERS=1`. In such way You do not slow down other developers of same project.
☒ Yes, generally that is a good practice with the environment variables. However, I've found in this particular case with the parallel workers, that it also causes reporting issues with simple_cov, so typically, I comment out that line. I have my CI/CD create an artifact of the simple_cov report, so I like keeping it around 😊
1) I am trying now conditional breakpoint, but it stops on every user. Not just the "chosen" one. Fresh new rails app. 2) Test explorer on that app fails to find tests at first. After restart of VSCode it found them. But when I run them, it changes icon to blue "..." circle and then back to gray cirlce with black square. And no messages appears.
That's strange. For the debugger, can you right click on the breakpoint column and try adding a conditional breakpoint there?
For the test explorer, what test framework are you using? You may want to try to go into the config and run the test manually. Also, since VS Code is an electron based application, you can pull up the debugger tools (similar to what is available in Chrome) and see any console outputs. There could be an issue and you'll get, hopefully, a more descriptive output.
Thanks for the great episode really useful. The one thing stopping me from migrating to VS code to RubyMine is the ability to debug a rails console session which I haven't been able to set up in VS Code. Do you know if there is any way to do this? Thanks.
I am using Rails 6.1.1 and Ruby 3.0.0 and I am seeing some things in the generated code that don't seem to match yours. General question: which versions of rails and ruby do you recommend for a greenfield app and/or for learning?
What kinds of things are you seeing? I believe this was done pre 6.1.0, but the Ruby version shouldn’t matter. If starting a new app, I would probably target Ruby 3.X. However, if it were something that was a shared library, I would target a lower version but also test compatibility with 3.0.
I haven't tried the VS Code debugging on Rails 7 yet. I'm still "stuck in the past" with how I debug. I find "puts debugging" to be quick and efficient. I even started to add in little emojis ❤️❤️❤️ to more easily see them in the logs.
For `parallelize(workers: 1)` I preffer to use ENV variable `PARALLEL__WORKERS=1`. In such way You do not slow down other developers of same project.
2) Test explorer on that app fails to find tests at first. After restart of VSCode it found them. But when I run them, it changes icon to blue "..." circle and then back to gray cirlce with black square. And no messages appears.
For the test explorer, what test framework are you using? You may want to try to go into the config and run the test manually. Also, since VS Code is an electron based application, you can pull up the debugger tools (similar to what is available in Chrome) and see any console outputs. There could be an issue and you'll get, hopefully, a more descriptive output.