ISSUE with Do every 1 second AND Debug_mode

So, with anyone here needs to have a Current time updated, or wants to register how long does it take for a user do something, they will need a “Do every 1 second workflow”, right?!

But, what I don’t see anyone talking about it’s how this kind of workflow messes up with DEBUG_MODE, it’s just IMPOSSIBLE to check any bug because the “Do every 1 second” will appear ALL THE TIME!!!

What I suggest → The same way there’s the opcion to add a pointbreak, to ADD THE OPTION to IGNORE any workflow in the Debug mode!!!

This way, it will allow people to check bugs in the right way!

What do you think??? Would you like to have this feature??

1 Like

Feel your pain lol. I’ve always had to turn them off manually before debugging.

1 Like

Great suggestion! +1 for this.

I actually have a workaround when activating my debugging “tools”. I have a URL parameter that will activate/deactivate workflows/elements that i need (or don’t) for debugging.

This let’s me debug in peace, even in Live, anytime i need to.

3 Likes

Agree!
Feel free to submit the idea to the ideaboard else I’m afraid it will never reach the top :frowning:

I added it for you, you can now upvote it there: https://bubble.io/ideaboard

Just add breakpoint to workflows to debug. Works much better

1 Like

what description have you used? It will make it easy to search there

PS: There is another idea that would be good, to also add a folder on workflows that cointains all “add a breakpoint” and this new “ignore workflow on debug”, because if you don’t know where it is, good luck trying to find haha

As @vnihoul77 told, lets vote on the idea board: https://bubble.io/ideaboard

Just search for:
Choosing a workflow NOT TO SHOW on debug mode’s steps

Wait… you’re using a Do every 1 second to tell how long it takes a user to perform an action?

I’ve never had to do this myself, but why don’t you subtract current date/time - the date/time = the amount of time it took for them to perform the action?

The way you’re describing it sounds incredibly inefficient

You’re right, I do this is some parts of my app too, but to get the current time and work it like a clock it needs the do every 1 second, that’s what many tutorial of bubble say to do…

It probably doesn’t affect performance much but I recommend NOT doing that because there is a much more logical and easier way to debug & manage that.

On an element (or the page itself), create two states:

  1. initialTime (as type date)
  2. finalTime (as type date)

When the user starts, set the initialTime
When the user ends, set the finalTime

Finally, subtract the two numbers to obtain the time it took. Wayyy better than the do every 1 second thing (and much easier to debug!)

2 Likes

no, not right…

as @jonah.deleseleuc says, just clock the start time and the end time… no need to run a workflow every second (I’m not even sure how that would work, or what it would be for?..)

1 Like

I think every 1 second he was adding 1 to the state of type number… :fearful:

1 Like

Is there any other alternative to get a clock moving sec by sec?
what I do → every 1 sec → current time state = Current Date/Time

1 Like

Is there any other alternative to get a clock moving sec by sec?
what I do → every 1 sec → current time state = Current Date/Time

Yeah, that’s what you need to do to update the time on the page…

… but that’s not necessary to record how long a User takes to perform an action - just clock the initial time (as Current Date/time) and the time they performed the action (also as Current Date/time)…

1 Like

Why do you need a clock running second by second? It just doesn’t seem necessary to me.

I exercises that are available after a date, and on home page there’s a countdown showing how long it will take to be available…

But you are right, maybe it’s more efficient to not show the seconds left, just the minutes

There’s a free plugin that can display the current time live, can’t recall what it’s called, that you can use instead.

You should be able to acheive what you need with a text element that calculates the difference between a user timestamp and the current time.

2 Likes

You should be able to display the time on the page using a client side method. For example, a plug-in.

I know it’s working right now but I strongly suggest you don’t use a loop just to display the time on the page (it’s just a bad way to develop things, I’m sorry)

For anyone reading this in the future you should use loops sparingly and only when necessary. Often times there’s a better solution to your problem.

1 Like

Thanks guys, I will take a look!

The sad part is that if you search for tutorials on YouTube, it will recommend using a loop, at least that was the reason why I did it

1 Like