I'm running Rails and VSCode with WSL 1.0 with Ubuntu 20.04.
I start up VSCode with WSL. 1.0 (WSL 2.0 had network routing problems for me).
If WEB_CONCURRENCY > 0 via config/puma.rb, Puma will run in cluster mode with multiple concurrent worker threads and terminate them if they appear to be not returning a response after a timeout period. When debugging in a worker thread I observe that breakpoints work, I make a few steps in the code and then the debugger stops responding at all. A log message indicates that Puma has terminated a worker thread. This commonly occurs with breakpoints set or even if just running slower with a large app running in the debugger.
This is fixed by setting WEB_CONCURRENCY=0.
So I'd recommend adding the following to Debug Rails Server launch.json ...
VS Code 1.63.2 / Rails 6.0.4 / Puma gem 4.3
I'm running Rails and VSCode with WSL 1.0 with Ubuntu 20.04.
I start up VSCode with WSL. 1.0 (WSL 2.0 had network routing problems for me).
If WEB_CONCURRENCY > 0 via
config/puma.rb
, Puma will run in cluster mode with multiple concurrent worker threads and terminate them if they appear to be not returning a response after a timeout period. When debugging in a worker thread I observe that breakpoints work, I make a few steps in the code and then the debugger stops responding at all. A log message indicates that Puma has terminated a worker thread. This commonly occurs with breakpoints set or even if just running slower with a large app running in the debugger.This is fixed by setting
WEB_CONCURRENCY=0
.So I'd recommend adding the following to Debug Rails Server
launch.json
...Here's my complete config for
Debug Rails server
...