You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
On Fri, 1 Sep 2017, 22:51 Steve Weil ***@***.***> wrote:
Not sure if related...
Debugger works with hardcoded target, e.g. "program":
"${workspaceRoot}/main.rb"
But if user doesn't know to call their file main.rb then there is no
error or warning.
Also, "program": "${workspaceRoot}/{file}" silently fails.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACQ6IM6DOEFb67y3sqtL7sTKnQpAtY4ks5seHxbgaJpZM4Mli6O>
.
did VSCode's core extension team figure this out? Or is it on the extension creator? Or is this fixed but I'm just having problems getting to work after hours of hunting down blogs with people claiming it works?
@wingrunr21 well thanks for following up and what a great morning, because it works. Just for closure, here's my environment:
$gem list debase byebug ruby-debug-ide
*** LOCAL GEMS ***
debase (0.2.2)
debase-ruby_core_source (0.10.3)
*** LOCAL GEMS ***
byebug (10.0.2, 9.0.6)
pry-byebug (3.4.2)
*** LOCAL GEMS ***
ruby-debug-ide (0.6.1)
vscode version 1.26.1
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
rvm current ruby-2.5.1
And I have this configuration working - whatever file I have in open and in context, F5 will start debugger and hit breakpoints. Note when vscode created my launch.json, it ad // comments in it so I had to remove those..
Ok great! To be clear the gems are not installed via bundler and you are not using a gemset correct? I’m gathering information on people’s environments to see if I can figure out a better way to auto detect things.
I'm not an expert when it comes to rails development. With that said, we have a puma.rb located in our application that looks like this:
# Specifies the number of `workers` to boot in clustered mode.# Workers are forked webserver processes. If using threads and workers together# the concurrency of the application would be max `threads` * `workers`.## Best to have # workers match # of cores.workersENV.fetch("PUMA_WORKERS"){2}# Puma can serve each request in a thread from an internal thread pool.# The `threads` method setting takes two numbers a minimum and maximum.# Any libraries that use thread pools should be configured to match# the maximum value specified for Puma. Default is set to 5 threads for minimum# and maximum, this matches the default thread size of Active Record.threads_count=ENV.fetch("RAILS_MAX_THREADS"){5}.to_ithreadsthreads_count,threads_countpreload_app!rackupDefaultRackup# Specifies the `port` that Puma will listen on to receive requests, default is 3000.portENV.fetch("PORT"){3000}# Specifies the `environment` that Puma will run in.environmentENV.fetch("RAILS_ENV"){"development"}on_worker_bootdoActiveRecord::Base.establish_connectionend
Setting environment variables PUMA_WORKERS=0 and RAILS_MAX_THREADS=1 worked for me to get debug working. I will say however this is not viable because our app now relies on multithreading which means I don't have a workable solution for my use case. If you can get away with using a single thread for local development this might do the trick for you.
Reacted by Tim Macfarlane, Christopher Crouse, Rahul Arora, Nikolay Ponomarev, Felipe Armoni, Steve Nekoliczak and Kyle Schutt
Hi there,
apparently same issue here. Trying to run rails server (debug) or attach to a debug console session fail. (It worked like 1 month ago)
My env
Version: 1.32.1
Commit: 05f146c7a8f7f78e80261aa3b2a2e642586f9eb3
Date: 2019-03-08T00:46:10.898Z
Electron: 3.1.3
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.8.0-36-generic
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
rvm 1.29.1 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]
ruby extension : 0.22.3
*** LOCAL GEMS ***
debase (0.2.2)
debase-ruby_core_source (0.10.3)
*** LOCAL GEMS ***
ruby-debug-ide (0.6.1)
Launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
Rails server -> run a rails server and stop on breakpoints !
Listen for rdebug-ide -> attach to a rails console debug session
Actual behavior
Rails server does not launch. Only debug bar is displayed. Debug console is not automatically displayed
Only an 'Assertion failed' in OUTPUT console (Extensions).
Hope it'll help.
Reacted by Nicolas Rouanne, Pablo Centurión, Luis Nunes and Alexandre Stapenhorst
Hi @Pablushka,
I’m not developping ruby apps anymore. I can’t remember workarounds I used.
Sorry!
I was using Rubymine for debugging when vs code extensions were not functional.
Activity
raldred commentedon Apr 7, 2017
Will you post your
launch.json?davrem commentedon Apr 18, 2017
I am having the exact same problem. Originally I had Ruby 2.3.3 (x64) installed but then uninstalled and installed the version below.
Your environment
Below is my launch.json
{
"version": "0.2.0",
"configurations": [
}
sergd2005 commentedon May 9, 2017
For me debugger stopped working too:
vs code : Version 1.12.1 (1.12.1)
{
"version": "0.2.0",
"configurations": [
{
"name": "test.rb",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "test.rb",
"args": [
"iPad Pro (9.7 inch)", "10.3"
]
}
]
}
seweil commentedon Sep 1, 2017
Not sure if related...
Debugger works with hardcoded target, e.g.
"program": "${workspaceRoot}/main.rb"But if user doesn't know to call their file
main.rbthen there is no error or warning.Also,
"program": "${workspaceRoot}/{file}"silently fails.raldred commentedon Sep 2, 2017
seweil commentedon Sep 5, 2017
Thanks @raldred - I mistyped.
Here is a copy and paste from my
launch.json:I get this in the Debug Console window, but nothing else. (And no debug toolbar with Continue, Step Over, etc.)
Specifying a complete file name works fine. (e.g.
"program": "${workspaceRoot}/main.rb")wingrunr21 commentedon Apr 3, 2018
Closing for issue cleanup. Apologies if this is still an issue. We are working to improve the core extension experience.
jzajac2 commentedon Oct 8, 2018
did VSCode's core extension team figure this out? Or is it on the extension creator? Or is this fixed but I'm just having problems getting to work after hours of hunting down blogs with people claiming it works?
wingrunr21 commentedon Oct 8, 2018
It somewhat depends on your setup right now. There are definitely issues with the debugger though.
How do you have the debugging gems installed?
jzajac2 commentedon Oct 8, 2018
@wingrunr21 well thanks for following up and what a great morning, because it works. Just for closure, here's my environment:
$
gem list debase byebug ruby-debug-ide*** LOCAL GEMS ***
debase (0.2.2)
debase-ruby_core_source (0.10.3)
*** LOCAL GEMS ***
byebug (10.0.2, 9.0.6)
pry-byebug (3.4.2)
*** LOCAL GEMS ***
ruby-debug-ide (0.6.1)
vscode version 1.26.1
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
rvm current ruby-2.5.1
And I have this configuration working - whatever file I have in open and in context, F5 will start debugger and hit breakpoints. Note when vscode created my launch.json, it ad // comments in it so I had to remove those..
wingrunr21 commentedon Oct 8, 2018
Ok great! To be clear the gems are not installed via bundler and you are not using a gemset correct? I’m gathering information on people’s environments to see if I can figure out a better way to auto detect things.
jzajac2 commentedon Oct 9, 2018
correct, the related gems for this project are not installed via bundler. I do have this in my Gemfile though:
tgmerritt commentedon Feb 1, 2019
My debugger stopped working recently:
launch.json:
Using puma as my web server - it's booting in single worker mode (typically run with multiple workers but not in development)
Installed using the shell embedded into VScode - shouldn't make a difference but just to be safe
Not referenced in Gemfile and I don't use RVM so no gemsets.
Breakpoints are just ignored - like they aren't even there.
qortex commentedon Feb 12, 2019
Same here, can't get it to work.
Any pointer to try and understand what could be the cause?
bradleygolden commentedon Mar 6, 2019
I couldn't get debugging to work with Puma until I set workers to 0 and threads to 1. In my case, threading/worker processes were causing issues.
senhalil commentedon Mar 6, 2019
Hi @bradleygolden, do you mind explaining a bit further how to set these parameters?
I am new to ruby/vscode and trying to debug an application which uses
rake server(which uses Puma under the hood) andrake resque:workers.I explain my problem further in #448 (comment) #448 (comment)
Any help would be very much appreciated :)
bradleygolden commentedon Mar 7, 2019
I'm not an expert when it comes to rails development. With that said, we have a
puma.rblocated in our application that looks like this:Setting environment variables
PUMA_WORKERS=0andRAILS_MAX_THREADS=1worked for me to get debug working. I will say however this is not viable because our app now relies on multithreading which means I don't have a workable solution for my use case. If you can get away with using a single thread for local development this might do the trick for you.tomraulet commentedon Mar 13, 2019
Hi there,
apparently same issue here. Trying to run rails server (debug) or attach to a debug console session fail. (It worked like 1 month ago)
My env
Launch.json
Expected behavior
Rails server -> run a rails server and stop on breakpoints !
Listen for rdebug-ide -> attach to a rails console debug session
Actual behavior
Rails server does not launch. Only debug bar is displayed. Debug console is not automatically displayed
Only an 'Assertion failed' in OUTPUT console (Extensions).
Hope it'll help.
Pablushka commentedon Jan 18, 2020
@foxpowa did you found any solution? can you share it? Thank you.
tomraulet commentedon Jan 18, 2020
Hi @Pablushka,
I’m not developping ruby apps anymore. I can’t remember workarounds I used.
Sorry!
I was using Rubymine for debugging when vs code extensions were not functional.