Skip to content

Conversation

@Gladear
Copy link
Contributor

@Gladear Gladear commented Jan 7, 2026

I just noticed that plug :dbg is a thing, which I think is incredibly useful during development to help debug a pipeline.

I thought it was worth mentioning in the doc, although I see this is a "side-effect" of the way dbg/2 works, and not the actual wanted behaviour, so I can see why maintainers of both Elixir and Plug may not want to see it documented. Feel free to close the PR if that not something you want to keep 🙂

@josevalim
Copy link
Member

I think this is great but I don't think the README is the best place to put it. Perhaps as part of the Plug.Debugger module?

@Gladear
Copy link
Contributor Author

Gladear commented Jan 8, 2026

I agree putting this in the README feels a bit out of place. However, the Plug.Debugger module already seem to have its own specific purpose (showing an error page), and I can't seem to see a place that would seem right in the @moduledoc. Maybe in Plug.Builder?

@Gladear
Copy link
Contributor Author

Gladear commented Jan 9, 2026

I tried to move the mention in Plug.Builder, which I personally think makes a little more sense. Feel free to tell me otherwise 😄
The wording is always open to suggestion

Comment on lines 130 to 131
at a certain point in the pipeline. This can be achieved by plugging the `dbg/2`
macro from Elixir kernel:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
at a certain point in the pipeline. This can be achieved by plugging the `dbg/2`
macro from Elixir kernel:
at a certain point in the pipeline. This can be achieved by plugging the `dbg/2`
from Elixir. Since it accepts and returns the connection as first argument, and
takes options as the second, it just works:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added in e503a65

@josevalim josevalim merged commit a0e274b into elixir-plug:main Jan 9, 2026
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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.

2 participants