Byebug Fully Supports Windows or Not

Byebug fully supports Windows or not?

Yes, byebug support Windows.

Rails 5 adds platform: :mri option to byebug gem. (see here)

Windows platforms were probably overlooked when that patch was added.

And this document says mri does not include Windows.

That's right.

I heard some people said that some commands (e.g.restart) did not work in their Windows PC.

Those people should report those issues to the project.

CI tests are passing against Windows environment.(see here)

Thtat's right, the best indicator of support ;)

And I cannot find any limitation on Windows environment in Byebug's README.

Another good indicator :)

How do I show more surrounding code in byebug?

You are looking for set listsize.

P.S. never used byebug, just a quick sight on the gem's Readme.

similar to gem byebug for coffescript

Use debugger as you would byebug and make sure you have the browser's developer console open. Execution will pause and you can step through the debugger and peek at the local scope.

See the documentation on debugger for more

Debugging in JRuby 9000

As you can see in https://rubygems.org/gems/pry/versions, there are many java versions of pry that work very well with jruby since jruby 1.6.

Pry is not MRI dependent. You can also use pry-remote in case your application is a web server or a rails app.

I've tried using byebug and gave up since it was not supported on jruby.

What is the correct way to detect if ruby is running on Windows?

Preferred Option (Updated based on @John's recommendations):

require 'rbconfig'
is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)

This could also work, but is less reliable (it won't work with much older versions, and the environment variable can be modified)

is_windows = (ENV['OS'] == 'Windows_NT')

(I can't easily test either on all of the rubies listed, or anything but Windows 7, but I know that both will work for 1.9.x, IronRuby, and JRuby).



Related Topics



Leave a reply



Submit