Repository navigation
[dbg] make simple tracer() remsh-friendly - #9589
Merged
Merged
Conversation
Contributor
CT Test ResultsNo tests were run for this PR. This is either because the build failed, or the PR is based on a branch without GH actions tests configured. Results for commit ede0811 To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
stolen
force-pushed
the
dbg-tracer-for-remsh
branch
from
March 13, 2025 15:51
9e6e94a to
91cf595
Compare
stolen
force-pushed
the
dbg-tracer-for-remsh
branch
2 times, most recently
from
March 17, 2025 09:18
53b2012 to
7dd7d9d
Compare
frazze-jobb
reviewed
Apr 22, 2025
| %% When user (human) sets up dbg over remsh, group_leader is on other node. | ||
| %% In this case, pass printed info to the remote group_leader | ||
| %% so the user (human) can see what's happening | ||
| case node(group_leader()) == node() of |
Contributor
There was a problem hiding this comment.
Could you add a check here, that looks for if the current process is a shell.
{_Key, Ancestors} = process_info(self(),{dictionary, '$ancestors'})), shell:whereis() == hd(Ancestors).
stolen
force-pushed
the
dbg-tracer-for-remsh
branch
from
April 22, 2025 12:17
7dd7d9d to
7eda3af
Compare
`dbg:tracer()` as shown in getting started was printing everything via local `user` process. This made trace messages invisible over remsh unless tracer was explicitly configured. This commit makes default trace use group_leader, making it less surprising for remsh users.
frazze-jobb
force-pushed
the
dbg-tracer-for-remsh
branch
from
May 26, 2025 08:34
7eda3af to
ede0811
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
Consider following
dbggetting started guide https://www.erlang.org/doc/apps/runtime_tools/dbg.htmlIf performed over remsh (e.g. when debugging a production node), default tracer prints all its messages to
userprocess on the main node. This leads to no data printed to the shell which started the tracer, making dbg unusable for novice remsh users.Solution
In this PR I make default tracer aware of remsh, and when remsh is detected, the output is sent to remote group_leader.
For local calls behaviour stays as before -- default output is
userprocess.