Sha256: 9e813b6bf8eb8e3797065707716214df8724022f6aff82c14e22f93740365cb8
Contents?: true
Size: 846 Bytes
Versions: 2
Compression:
Stored size: 846 Bytes
Contents
module Byebug class Context class << self def stack_size(byebug_frames = false) backtrace = Thread.current.backtrace_locations(0) return 0 unless backtrace unless byebug_frames backtrace = backtrace.select { |l| !ignored_file?(l.path) } end backtrace.size end end IGNORED_XML_FILES = Dir.glob(File.expand_path('../../../**/*', __FILE__)) def ignored_file_with_xml(path) result = ignored_file_without_xml(path) || IGNORED_XML_FILES.include?(path) || !!path.match(/^\(eval\)/) || !!path.match(/rdebug-vim$/) || !!path.match(/rdebug-ide$/) || !!path.match(/rdebug-xml$/) result end alias_method :ignored_file_without_xml, :ignored_file? alias_method :ignored_file?, :ignored_file_with_xml end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
debugger-xml-0.5.0.pre2 | lib/byebug/context_xml.rb |
debugger-xml-0.5.0.pre1 | lib/byebug/context_xml.rb |