Skip to content
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

Add Stimulus debug option via url param #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add Stimulus debug option via url param #1

wants to merge 1 commit into from

Conversation

eelcoj
Copy link
Contributor

@eelcoj eelcoj commented Dec 13, 2024

This would be the first step into branching this library in more than just custom action options.

Set up:

// app/javascript/controllers/application.js

import { Application } from "@hotwired/stimulus"
import { registerDevMode } from "stimulus-fx";

const application = Application.start()
registerDevMode(application)

window.Stimulus = application

export { application }

You can then append ?debug=true to see all debugging logs in the console for Stimulus (similar to adding application.debug = true). Append ?debug=false to disable again.

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.

1 participant