-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected stoppage on remote debugging connection #629
Comments
This behavior is same as
Now non-stop flag is debuggee's flag. |
I used
For the use cases I see (mostly attaching to a Rails server), I don't see much need for that. But it stopping at places like puma's internal (as shown above) is confusing and annoying. Let me also explain how we use the debugger with our development tooling:
And ideally, the server should run normally until we hit the breakpoint after reloading the page or making a request. But we always end up stopping at this place and then need to click So IMO, it'd be great to make it optional and also non-default. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Ah the signal is always triggered by the debugger server itself (pause source). So which signal it uses doesn't matter for this issue. |
For me, it also seems to lose the attached debugger sometimes on subsequent requests. The server would say "wait for debugger connection..." while the client debugger that was attached would be blocked waiting — even |
I understand the scenario on #629 (comment).
We can consider separately with 'rdbg -A` and attach on VSCode (or not sure it should be same or not). For example, we can add another setting (like "nonstop": true) in launch.json.
At least, it should be one click.
Could you check other debugger's (python, go, ...) attach behavior on VSCode? There are another aspect: breakpoints (set by command or |
So I prefer:
I think the same default behavior with other debuggers is good, so it it is my current consideration. |
👍 good call
I like the client configuration idea, but I think for users it'll be hard to understand the difference between server's nonstop and the client's nonstop. Perhaps a different name will be better, like I also hope this behavior can also be configured on the server side, with something like |
I checked the following GUI tool to attach and all of them do not stop the debuggee:
So I changed my mind for nonstop on attaching with DAP. On the CUI attachment, I confirmed that gcc/lldb/dlv (Golang) do stop at attach, so I remain the current behavior. |
On the JavaScript with nodejs, I found interesting that it doesn't stop at
|
With nodejs's default debugger, the CUI doesn't stop at connection. It only stops when it hits the breakpoint. // test.js
i = 0
while (i >= 0) {
console.log(i);
i++;
if (i >= 3000000) {
debugger;
}
} Terminal1
Terminal2 Initially it'll be:
And when it hits the breakpoint, the source will be shown and the program will only stop then:
Does that mean DAP won't stop even without |
yes. |
As decided in ruby#629 (comment)
@ko1 I've updated my PR to only skip DAP's connection stop. |
The command needs the `nonstop` (-n) flag for reasons I didn't fully understand. ruby/debug#629
The command needs the `nonstop` (-n) flag for reasons I didn't fully understand. ruby/debug#629
The command needs the `nonstop` (-n) flag for reasons I didn't fully understand. ruby/debug#629
The command needs the `nonstop` (-n) flag for reasons I didn't fully understand. ruby/debug#629
The command needs the `nonstop` (-n) flag for reasons I didn't fully understand. ruby/debug#629
The command needs the `nonstop` (-n) flag for reasons I didn't fully understand. ruby/debug#629
The command needs the `nonstop` (-n) flag for reasons I didn't fully understand. ruby/debug#629
Recently I mostly use remote debugging and this trap (https://github.com/ruby/debug/blob/master/lib/debug/server.rb#L229) means the program (usually Rails server) will be stopped upon connection, even with the
nonstop
flag.And I'll need to manually skip the first few frames every time the connection is established, which is annoying. One example:
So my questions are:
Why does the debugger need to stop for this signal?If it's needed in some cases, can we skip this behavior whennonstop
flag is used?Why should the debuggee be paused with signal by itself upon activation? The stoppage is triggered by the debugger server itself (pause source)
The text was updated successfully, but these errors were encountered: