Skip to content

Conversation

@ko1
Copy link
Collaborator

@ko1 ko1 commented Dec 5, 2025

for BasicObject

fix #1152

for BasicObject

fix ruby#1152
@launchable-app
Copy link

launchable-app bot commented Dec 5, 2025

2/689 Tests Failed

/home/runner/work/debug/debug/test/protocol/catch_raw_dap_test.rb#test_catching_any_exception_works_correctly
-------------------------
| All Protocol Messages |
-------------------------

V>D {"seq":1,"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"rdbg","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request"}
V>D {"seq":2,"command":"attach","arguments":{"type":"rdbg","name":"Attach with rdbg","request":"attach","rdbgPath":"/home/runner/work/debug/debug/exe/rdbg","debugPort":"/var/folders/kv/w1k6nh1x5fl7vx47b2pd005w0000gn/T/ruby-debug-sock-501/ruby-debug-naotto-8845","autoAttach":true,"__sessionId":"141d9c79-3669-43ec-ac1f-e62598c5a65a"},"type":"request"}
V>D {"seq":3,"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request"}
V>D {"seq":4,"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[{"filterId":"RuntimeError"}]},"type":"request"}
V>D {"seq":5,"command":"configurationDone","type":"request"}
V<D {"type":"response","command":"initialize","request_seq":1,"success":true,"message":"Success","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportTerminateDebuggee":true,"supportsTerminateRequest":true,"exceptionBreakpointFilters":[{"filter":"any","label":"rescue any exception","supportsCondition":true},{"filter":"RuntimeError","label":"rescue RuntimeError","supportsCondition":true}],"supportsExceptionFilterOptions":true,"supportsStepBack":true,"supportsEvaluateForHovers":true,"supportsCompletionsRequest":true},"seq":1}
V<D {"type":"event","event":"initialized","seq":2}
V<D {"type":"event","event":"output","body":{"category":"console","output":"Ruby REPL: You can run any Ruby expression here.\nNote that output to the STDOUT/ERR printed on the TERMINAL.\n[experimental]\n  `,COMMAND` runs `COMMAND` debug command (ex: `,info`).\n  `,help` to list all debug commands.\n"},"seq":3}
V<D {"type":"response","command":"attach","request_seq":2,"success":true,"message":"Success","seq":4}
V<D {"type":"response","command":"setFunctionBreakpoints","request_seq":3,"success":true,"message":"Success","seq":5}
V<D {"type":"response","command":"setExceptionBreakpoints","request_seq":4,"success":true,"message":"Success","body":{"breakpoints":[{"verified":true,"message":"#<DEBUGGER__::CatchBreakpoint:0x00007f2fc60ac560 @pat=\"RuntimeError\", @key=[:catch, \"RuntimeError\"], @last_exc=nil, @deleted=false, @cond=nil, @command=nil, @path=nil, @tp=#<TracePoint:enabled>>"}]},"seq":6}
V<D {"type":"response","command":"configurationDone","request_seq":5,"success":true,"message":"Success","seq":7}
V<D {"type":"event","event":"stopped","body":{"reason":"pause","threadId":1,"allThreadsStopped":true},"seq":8}
V>D {"seq":6,"command":"threads","type":"request"}
V<D {"type":"response","command":"threads","request_seq":6,"success":true,"message":"Success","body":{"threads":[{"id":1,"name":"#1 /tmp/debug-20251205-2397-xdijpu.rb:1:in '<main>'"}]},"seq":9}
V>D {"seq":7,"command":"threads","type":"request"}
V<D {"type":"response","command":"threads","request_seq":7,"success":true,"message":"Success","body":{"threads":[{"id":1,"name":"#1 /tmp/debug-20251205-2397-xdijpu.rb:1:in '<main>'"}]},"seq":10}
V>D {"seq":8,"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request"}
V<D {"type":"response","command":"stackTrace","request_seq":8,"success":true,"message":"Success","body":{"stackFrames":[{"id":1,"name":"<main>","line":1,"column":1,"source":{"name":"debug-20251205-2397-xdijpu.rb","path":"/tmp/debug-20251205-2397-xdijpu.rb","sourceReference":0}}],"totalFrames":1},"seq":11}
V>D {"seq":9,"command":"scopes","arguments":{"frameId":1},"type":"request"}
V<D {"type":"response","command":"scopes","request_seq":9,"success":true,"message":"Success","body":{"scopes":[{"name":"Local variables","presentationHint":"locals","namedVariables":0,"indexedVariables":0,"expensive":false,"variablesReference":2},{"name":"Global variables","presentationHint":"globals","variablesReference":1,"namedVariables":41,"indexedVariables":0,"expensive":false}]},"seq":12}
V>D {"seq":10,"command":"variables","arguments":{"variablesReference":2},"type":"request"}
V<D {"type":"response","command":"variables","request_seq":10,"success":true,"message":"Success","body":{"variables":[{"name":"%self","value":"main","type":"Object","variablesReference":3,"indexedVariables":0,"namedVariables":1}]},"seq":13}
V>D {"seq":11,"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[{"filterId":"any"},{"filterId":"RuntimeError"}]},"type":"request"}
V<D {"type":"response","command":"setExceptionBreakpoints","request_seq":11,"success":true,"message":"Success","body":{"breakpoints":[{"verified":true,"message":"#<DEBUGGER__::CatchBreakpoint:0x00007f2fc60aad00 @pat=\"Exception\", @key=[:catch, \"Exception\"], @last_exc=nil, @deleted=false, @cond=nil, @command=nil, @path=nil, @tp=#<TracePoint:enabled>>"},{"verified":true,"message":"#<DEBUGGER__::CatchBreakpoint:0x00007f2fc60aac40 @pat=\"RuntimeError\", @key=[:catch, \"RuntimeError\"], @last_exc=nil, @deleted=false, @cond=nil, @command=nil, @path=nil, @tp=#<TracePoint:enabled>>"}]},"seq":14}
V>D {"seq":12,"command":"continue","arguments":{"threadId":1},"type":"request"}
V<D {"type":"response","command":"continue","request_seq":12,"success":true,"message":"Success","body":{"allThreadsContinued":true},"seq":15}
V<D {"type":"event","event":"stopped","body":{"reason":"exception","description":"#<ZeroDivisionError: divided by 0> is raised.","text":"#<ZeroDivisionError: divided by 0> is raised.","threadId":1,"allThreadsStopped":true},"seq":16}
V>D {"seq":13,"command":"threads","type":"request"}
V<D {"type":"response","command":"threads","request_seq":13,"success":true,"message":"Success","body":{"threads":[{"id":1,"name":"#1 /tmp/debug-20251205-2397-xdijpu.rb:1:in '<main>'"}]},"seq":17}
V>D {"seq":14,"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":20},"type":"request"}
V<D {"type":"response","command":"stackTrace","request_seq":14,"success":true,"message":"Success","body":{"stackFrames":[{"id":2,"name":"Foo::Bar.a","line":4,"column":1,"source":{"name":"debug-20251205-2397-xdijpu.rb","path":"/tmp/debug-20251205-2397-xdijpu.rb","sourceReference":0}},{"id":3,"name":"<module:Foo>","line":7,"column":1,"source":{"name":"debug-20251205-2397-xdijpu.rb","path":"/tmp/debug-20251205-2397-xdijpu.rb","sourceReference":0}},{"id":4,"name":"<main>","line":1,"column":1,"source":{"name":"debug-20251205-2397-xdijpu.rb","path":"/tmp/debug-20251205-2397-xdijpu.rb","sourceReference":0}}],"totalFrames":4},"seq":18}

--------------------------
| Last Protocol Messages |
--------------------------

{
  "seq": 13,
  "command": "threads",
  "type": "request"
}
{
  "type": "response",
  "command": "threads",
  "request_seq": 13,
  "success": true,
  "message": "Success",
  "body": {
    "threads": [
      {
        "id": 1,
        "name": "#1 /tmp/debug-20251205-2397-xdijpu.rb:1:in '<main>'"
      }
    ]
  },
  "seq": 17
}
{
  "seq": 14,
  "command": "stackTrace",
  "arguments": {
    "threadId": 1,
    "startFrame": 0,
    "levels": 20
  },
  "type": "request"
}
{
  "type": "response",
  "command": "stackTrace",
  "request_seq": 14,
  "success": true,
  "message": "Success",
  "body": {
    "stackFrames": [
      {
        "id": 2,
        "name": "Foo::Bar.a",
        "line": 4,
        "column": 1,
        "source": {
          "name": "debug-20251205-2397-xdijpu.rb",
          "path": "/tmp/debug-20251205-2397-xdijpu.rb",
          "sourceReference": 0
        }
      },
      {
        "id": 3,
        "name": "<module:Foo>",
        "line": 7,
        "column": 1,
        "source": {
          "name": "debug-20251205-2397-xdijpu.rb",
          "path": "/tmp/debug-20251205-2397-xdijpu.rb",
          "sourceReference": 0
        }
      },
      {
        "id": 4,
        "name": "<main>",
        "line": 1,
        "column": 1,
        "source": {
          "name": "debug-20251205-2397-xdijpu.rb",
          "path": "/tmp/debug-20251205-2397-xdijpu.rb",
          "sourceReference": 0
        }
      }
    ],
    "totalFrames": 4
  },
  "seq": 18
}

--------------------
| Debuggee Session |
--------------------

> DEBUGGER: Debugger can attach via UNIX domain socket (/run/user/1001/rdbg-2397-17)
> DEBUGGER: wait for debugger connection...
> DEBUGGER: Connected.


-------------------
| Failure Message |
-------------------

expected:
{
  "type": "response",
  "command": "stackTrace",
  "request_seq": 14,
  "success": true,
  "message": "Success",
  "body": {
    "stackFrames": [
      {
        "name": "[C] Integer#/",
        "line": 4,
        "column": 1,
        "source": {
          "name": "(?-mix:debug-20251205-2397-xdijpu.rb)",
          "path": "(?-mix:\\/tmp\\/debug-20251205-2397-xdijpu.rb)",
          "sourceReference": 0
        },
        "id": 2
      },
      {
        "name": "Foo::Bar.a",
        "line": 4,
        "column": 1,
        "source": {
          "name": "(?-mix:debug-20251205-2397-xdijpu.rb)",
          "path": "(?-mix:\\/tmp\\/debug-20251205-2397-xdijpu.rb)",
          "sourceReference": 0
        },
        "id": 3
      },
      {
        "name": "<module:Foo>",
        "line": 7,
        "column": 1,
        "source": {
          "name": "(?-mix:debug-20251205-2397-xdijpu.rb)",
          "path": "(?-mix:\\/tmp\\/debug-20251205-2397-xdijpu.rb)",
          "sourceReference": 0
        },
        "id": 4
      },
      {
        "name": "<main>",
        "line": 1,
        "column": 1,
        "source": {
          "name": "(?-mix:debug-20251205-2397-xdijpu.rb)",
          "path": "(?-mix:\\/tmp\\/debug-20251205-2397-xdijpu.rb)",
          "sourceReference": 0
        },
        "id": 5
      }
    ]
  }
}

result:
{
  "type": "response",
  "command": "stackTrace",
  "request_seq": 14,
  "success": true,
  "message": "Success",
  "body": {
    "stackFrames": [
      {
        "id": 2,
        "name": "Foo::Bar.a",
        "line": 4,
        "column": 1,
        "source": {
          "name": "debug-20251205-2397-xdijpu.rb",
          "path": "/tmp/debug-20251205-2397-xdijpu.rb",
          "sourceReference": 0
        }
      },
      {
        "id": 3,
        "name": "<module:Foo>",
        "line": 7,
        "column": 1,
        "source": {
          "name": "debug-20251205-2397-xdijpu.rb",
          "path": "/tmp/debug-20251205-2397-xdijpu.rb",
          "sourceReference": 0
        }
      },
      {
        "id": 4,
        "name": "<main>",
        "line": 1,
        "column": 1,
        "source": {
          "name": "debug-20251205-2397-xdijpu.rb",
          "path": "/tmp/debug-20251205-2397-xdijpu.rb",
          "sourceReference": 0
        }
      }
    ],
    "totalFrames": 4
  },
  "seq": 18
}.
<"[C] Integer#/"> expected but was
<"Foo::Bar.a">.
/home/runner/work/debug/debug/test/protocol/eval_test.rb#test_eval_evaluates_arithmetic_expressions 🛡️ never-failing, but failed now
-------------------------
| All Protocol Messages |
-------------------------

C>D {"id":2,"method":"Runtime.enable","params":{}}
C>D {"id":3,"method":"Debugger.enable","params":{"maxScriptsCacheSize":10000000}}
C>D {"id":4,"method":"Debugger.setPauseOnExceptions","params":{"state":"none"}}
C>D {"id":5,"method":"Debugger.setAsyncCallStackDepth","params":{"maxDepth":32}}
C>D {"id":6,"method":"Profiler.enable","params":{}}
C>D {"id":7,"method":"Debugger.setBlackboxPatterns","params":{"patterns":[]}}
C>D {"id":8,"method":"Runtime.runIfWaitingForDebugger","params":{}}
C<D {"id":2,"result":{}}
C<D {"method":"Runtime.executionContextCreated","params":{"context":{"id":"054a140364f7305045170b7ef8fa8fa7","origin":"http://127.0.0.1:41563","name":""}}}
C<D {"id":3,"result":{"debuggerId":"0.30334445750530337"}}
C<D {"id":4,"result":{}}
C<D {"method":"Debugger.scriptParsed","params":{"scriptId":"1","url":"/tmp/debug-20251205-2395-1p50b94.rb","startLine":0,"startColumn":0,"endLine":5,"endColumn":0,"executionContextId":1,"hash":"4093982679790618785"}}
C<D {"method":"Debugger.paused","params":{"reason":"other","callFrames":[{"callFrameId":"c1f5e14b9d6f9654561623309f805ac7","functionName":"<main>","functionLocation":{"lineNumber":0,"scriptId":"1"},"location":{"lineNumber":0,"scriptId":"1"},"url":"/tmp/debug-20251205-2395-1p50b94.rb","scopeChain":[{"type":"local","object":{"type":"object","objectId":"0.17379358428097014"}},{"type":"script","object":{"type":"object","objectId":"0.8991249381094955"}},{"type":"global","object":{"type":"object","objectId":"0.0011300128647588892"}}],"this":{"type":"object"}}]}}
C>D {"method":"Debugger.setBreakpointByUrl","params":{"lineNumber":3,"urlRegex":"/tmp/debug\\-20251205\\-2395\\-1p50b94\\.rb|file:///tmp/debug\\-20251205\\-2395\\-1p50b94\\.rb","columnNumber":0,"condition":null},"id":9}
C<D {"id":8,"result":{}}
C<D {"id":9,"result":{"breakpointId":"1:3:/tmp/debug\\-20251205\\-2395\\-1p50b94\\.rb|file:///tmp/debug\\-20251205\\-2395\\-1p50b94\\.rb","locations":[{"scriptId":"1","lineNumber":3}]}}
C>D {"method":"Debugger.resume","params":{},"id":10}
C<D {"id":10,"result":{}}
C<D {"method":"Debugger.resumed","params":{}}
C<D {"method":"Debugger.paused","params":{"reason":"other","callFrames":[{"callFrameId":"3d7e38e74df58568ab4c10937b0a37cc","functionName":"Object#foo","functionLocation":{"lineNumber":1,"scriptId":"1"},"location":{"lineNumber":3,"scriptId":"1"},"url":"/tmp/debug-20251205-2395-1p50b94.rb","scopeChain":[{"type":"local","object":{"type":"object","objectId":"0.6569004526017006"}},{"type":"script","object":{"type":"object","objectId":"0.6408238364587274"}},{"type":"global","object":{"type":"object","objectId":"0.4024096121827938"}}],"this":{"type":"object"}},{"callFrameId":"e052519bca0761d99a99c3789cf8ac3a","functionName":"<main>","functionLocation":{"lineNumber":0,"scriptId":"1"},"location":{"lineNumber":4,"scriptId":"1"},"url":"/tmp/debug-20251205-2395-1p50b94.rb","scopeChain":[{"type":"local","object":{"type":"object","objectId":"0.32116328235556757"}},{"type":"script","object":{"type":"object","objectId":"0.2085854804563516"}},{"type":"global","object":{"type":"object","objectId":"0.18810141889884424"}}],"this":{"type":"object"}}]}}
C>D {"method":"Debugger.evaluateOnCallFrame","params":{"expression":"a","callFrameId":"3d7e38e74df58568ab4c10937b0a37cc","objectGroup":"console"},"id":11}
C<D {"method":"Debugger.scriptParsed","params":{"scriptId":"2","url":"","startLine":0,"startColumn":0,"endLine":1,"endColumn":0,"executionContextId":1,"hash":"1638165926909873887"}}
C<D {"id":11,"result":{"result":{"type":"number","description":"4","value":4,"objectId":"0.5186341358169824"}}}
C>D {"method":"Debugger.evaluateOnCallFrame","params":{"expression":"a","callFrameId":"e052519bca0761d99a99c3789cf8ac3a","objectGroup":"console"},"id":12}
C<D {"method":"Debugger.scriptParsed","params":{"scriptId":"3","url":"","startLine":0,"startColumn":0,"endLine":1,"endColumn":0,"executionContextId":1,"hash":"1638165926909873887"}}
C<D {"id":12,"result":{"result":{"type":"number","description":"2","value":2,"objectId":"0.16775790914152533"}}}
C>D {"method":"Runtime.terminateExecution","params":{},"id":13}
C<D {"id":13,"result":{}}

--------------------------
| Last Protocol Messages |
--------------------------

{
  "id": 12,
  "result": {
    "result": {
      "type": "number",
      "description": "2",
      "value": 2,
      "objectId": "0.16775790914152533"
    }
  }
}
{
  "method": "Runtime.terminateExecution",
  "params": {
  },
  "id": 13
}
{
  "id": 13,
  "result": {
  }
}

--------------------
| Debuggee Session |
--------------------

> DEBUGGER: Debugger can attach via TCP/IP (127.0.0.1:41563)
> DEBUGGER: wait for debugger connection...
> DEBUGGER: Connected.
> DEBUGGER: Disconnected.
> DEBUGGER: Connected.
> DEBUGGER: Disconnected.
> nil
> #<SignalException: SIGTERM>
> @@@ #<Thread:0x000055e470046d70 run>
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:1250:in `backtrace'
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:1250:in `block in wait_next_action_'
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:1248:in `each'
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:1248:in `rescue in wait_next_action_'
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:1243:in `wait_next_action_'
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:877:in `block in wait_next_action'
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:872:in `fiber_blocking'
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:877:in `wait_next_action'
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:320:in `suspend'
>  > /home/runner/work/debug/debug/lib/debug/thread_client.rb:251:in `on_breakpoint'
>  > /home/runner/work/debug/debug/lib/debug/breakpoint.rb:69:in `suspend'
>  > /home/runner/work/debug/debug/lib/debug/breakpoint.rb:170:in `block in setup'
>  > /tmp/debug-20251205-2395-1p50b94.rb:4:in `foo'
>  > /tmp/debug-20251205-2395-1p50b94.rb:5:in `<main>'
> @@@ #<Thread:0x000055e470de6fe8@DEBUGGER__::SESSION@server /home/runner/work/debug/debug/lib/debug/session.rb:179 sleep>
>  > /home/runner/work/debug/debug/lib/debug/server.rb:350:in `sleep'
>  > /home/runner/work/debug/debug/lib/debug/server.rb:350:in `block in readline'
>  > /home/runner/work/debug/debug/lib/debug/server_cdp.rb:688:in `sock'
>  > /home/runner/work/debug/debug/lib/debug/server.rb:341:in `readline'
>  > /home/runner/work/debug/debug/lib/debug/session.rb:445:in `wait_command'
>  > /home/runner/work/debug/debug/lib/debug/session.rb:405:in `block in wait_command_loop'
>  > /home/runner/work/debug/debug/lib/debug/session.rb:404:in `loop'
>  > /home/runner/work/debug/debug/lib/debug/session.rb:404:in `wait_command_loop'
>  > /home/runner/work/debug/debug/lib/debug/session.rb:330:in `process_event'
>  > /home/runner/work/debug/debug/lib/debug/session.rb:255:in `session_server_main'
>  > /home/runner/work/debug/debug/lib/debug/session.rb:207:in `block in activate'
> ["DEBUGGER Exception: /home/runner/work/debug/debug/lib/debug/thread_client.rb:1254", #<SignalException: SIGTERM>, ["/home/runner/work/debug/debug/lib/debug/thread_client.rb:895:in `pop'", "/home/runner/work/debug/debug/lib/debug/thread_client.rb:895:in `wait_next_action_'", "/home/runner/work/debug/debug/lib/debug/thread_client.rb:877:in `block in wait_next_action'", "/home/runner/work/debug/debug/lib/debug/thread_client.rb:872:in `fiber_blocking'", "/home/runner/work/debug/debug/lib/debug/thread_client.rb:877:in `wait_next_action'", "/home/runner/work/debug/debug/lib/debug/thread_client.rb:320:in `suspend'", "/home/runner/work/debug/debug/lib/debug/thread_client.rb:251:in `on_breakpoint'", "/home/runner/work/debug/debug/lib/debug/breakpoint.rb:69:in `suspend'", "/home/runner/work/debug/debug/lib/debug/breakpoint.rb:170:in `block in setup'", "/tmp/debug-20251205-2395-1p50b94.rb:4:in `foo'", "/tmp/debug-20251205-2395-1p50b94.rb:5:in `<main>'"]]


-------------------
| Failure Message |
-------------------

Expected the debuggee program to finish.

[-> View Test suite health in main branch]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Basic Object crashes record

1 participant