[ruby-list:50792] Re: [質問] rdebug lコマンドでソースが表示されない

From: yamataka@...08.itscom.net
Date: 2019-06-25 00:24:29 UTC
List: ruby-list #50792
市田さん

On Tue, 25 Jun 2019 07:40:10 +0900,
dogatana wrote:
> 
> こんにちは。市田です。
> 
> 2019年6月24日(月) 16:49 <yamataka@u08.itscom.net>:
> > Windows 10
> > msys2 mingw64 ターミナルで、
> > ruby -rdebug の際に、
> > l とコマンドを打ってもソースが表示されない症状に遭遇しています。
> > 回避策はありますでしょうか?
> 
> 回避策ではないですが、ソースレベルデバッグには byebug を利用しています。
> キー入力のエコーバックが遅い時などもありますが、便利ですよ。

アドバイスありがとうございます。
byebug 早速使ってみたのですが、

list       -- Lists lines of source code
でソースが表示されなくて、
? を打つとソース行と、helpメッセージが表示されます。

補足、
以前使用していた Windows7 マシンでも同様の症状に遭遇しており、
ruby を 2.6.1 に戻すと解消されました。
Windows10 マシンだと問題なく使えるかも? と思いましたが
同じ症状です。

yama@JPC00183513 /> type byebug
type: Could not find 'byebug'

yama@JPC00183513 /> gem install byebug
Building native extensions. This could take a while...
Successfully installed byebug-11.0.1
Parsing documentation for byebug-11.0.1
Installing ri documentation for byebug-11.0.1
Done installing documentation for byebug after 15 seconds
1 gem installed

yama@JPC00183513 /> type byebug
byebug is /mingw64/bin/byebug

yama@JPC00183513 /> cd ~/bin/platform/

yama@JPC00183513 ~/b/platform> head ecia_log_sgrep.rb
#! /usr/bin/env ruby
# coding: utf-8

require 'find'
require 'zlib'
require 'time'
require 'optparse'
require 'optparse/time'
require 'json'

yama@JPC00183513 ~/b/platform> byebug ecia_log_sgrep.rb
(byebug) list
list
(byebug) help
help
(byebug) ?
?

[1, 10] in C:/yama/bin/platform/ecia_log_sgrep.rb
    1: #! /usr/bin/env ruby
    2: # coding: utf-8
    3:
=>  4: require 'find'
    5: require 'zlib'
    6: require 'time'
    7: require 'optparse'
    8: require 'optparse/time'
    9: require 'json'
   10:
...
  break      -- Sets breakpoints in the source code
  catch      -- Handles exception catchpoints



In This Thread