vscode-rdbg icon indicating copy to clipboard operation
vscode-rdbg copied to clipboard

How to filter redundant output when using file redirection

Open 0O0OwO0O0 opened this issue 1 year ago • 0 comments

launch.json

    {
      "name": "Ruby",
      "type": "rdbg",
      "request": "launch",
      "script": "${file}",
      "useTerminal": true,
      "args": [
        "<",
        "${workspaceFolder}\\test\\in.txt",
        ">",
        "${workspaceFolder}\\test\\out.txt"
      ],
      "cwd": "${workspaceFolder}",
    }

ruby code

puts "hallo"

the out file

["F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/session.rb:1789:in `realpath'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/session.rb:1789:in `block in resolve_path'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/session.rb:1787:in `each'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/session.rb:1787:in `rescue in resolve_path'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/session.rb:1780:in `resolve_path'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/session.rb:1527:in `clear_line_breakpoints'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/server_dap.rb:348:in `process_request'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/server_dap.rb:298:in `process'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/server.rb:73:in `block (3 levels) in activate'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/server.rb:273:in `setup_interrupt'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/server.rb:71:in `block (2 levels) in activate'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/server.rb:451:in `block (2 levels) in accept'",
 "F:/Devkits/Ruby/lib/ruby/3.3.0/socket.rb:815:in `block (2 levels) in accept_loop'",
 "F:/Devkits/Ruby/lib/ruby/3.3.0/socket.rb:812:in `each'",
 "F:/Devkits/Ruby/lib/ruby/3.3.0/socket.rb:812:in `block in accept_loop'",
 "<internal:kernel>:187:in `loop'",
 "F:/Devkits/Ruby/lib/ruby/3.3.0/socket.rb:810:in `accept_loop'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/server.rb:449:in `block in accept'",
 "F:/Devkits/Ruby/lib/ruby/3.3.0/socket.rb:787:in `tcp_server_sockets'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/server.rb:425:in `accept'",
 "F:/Devkits/Ruby/lib/ruby/gems/3.3.0/gems/debug-1.9.2/lib/debug/server.rb:49:in `block in activate'"]
hallo

How to filter redundant output when using input/output redirection

0O0OwO0O0 avatar Sep 22 '24 14:09 0O0OwO0O0