Skip to content

JRubyExec doesn't stop on debugger #444

@boris-petrov

Description

@boris-petrov
plugins {
        id 'com.github.jruby-gradle.base' version '2.0.2'
}

jruby.jrubyVersion = '9.4.2.0'

repositories {
        mavenCentral()
        ruby.gems()
}

dependencies {
        gems 'rubygems:pry:0.14.2'
        gems 'rubygems:pry-debugger-jruby:2.1.1'
        gems 'rubygems:spoon:0.0.6'
}

import com.github.jrubygradle.JRubyExec

tasks.register('test', JRubyExec) {
        jrubyArgs '--debug'
        script 'a.rb'
}

a.rb:

require 'pry-debugger-jruby'

binding.pry

puts 1

Running gradle test on this should stop the execution on the binding.pry line and only when continue is typed-in should execution continue and 1 be printed. Instead, execution continues immediately and the process exits.

This doesn't happen when manually running jruby --debug a.rb - in that case all works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions