Disable code option

A feature I’d like to see in Hopscotch is:

being able to disable pieces of code

It would be helpful while testing a certain piece of code or debugging it.

An example of where it could be used is, when you have made a trail art which takes a long time to be drawn, and you want to see if the last piece of code works.
Then, you can disable the code before it and see if it works.

14 Likes

You can already do that by getting a “Disable” custom rule, putting all the code you want to disable in there, delete it, test the project, then you can put it back if it works without.

9 Likes

Interesting idea for sure, but why not just put that trail art piece first for testing?

8 Likes

Good idea. It’s going to be more convenient,

What I to “disable” code is I copy it then paste it inside a when 0 = 1 block. Then I copy paste again to return it.

10 Likes

This would be super helpful! It is possible to do this with code right now, but just having a native feature would be so much easier.

8 Likes

Good idea

I do something similar to what @CodingRoyale does, or I make whatever function I want to disable impossible to do (via variables, of “if else/once if” blocks)

9 Likes

For sure a good idea

I also use a repeat forever if I want it to terminate, or the secret block “freeze” to pinpoint issues.

6 Likes

Great idea, but as someone who I forgot already (lol) said, just put the blocks you want to disable into the rule and delete it. Then put it back later :woman_shrugging:t2:

If this was a block, how would you specify what code to disable?

7 Likes

nice idea

4 Likes

When you select it, an option could appear or there could be a rule.

4 Likes

An option. The rule would be almost the exact same thing as a custom rule. They should add it as a pre-made rule that would set the text to ‘disable code here’ or something

6 Likes

I would think you should have the option to disable along with the copy options, (by selecting the code block and double tapping) because you could just create a custom like that already

8 Likes

Yes.

I thought this was a good idea but now I think its basically a custom rule in a block. It would be a great idea though
Sorry if you think I’m being rude or mean, i just like getting my feelings out there

7 Likes

You’re not, don’t worry

4 Likes

No it’s fine, everyone changes their mind every now and again

4 Likes

Just put a check ‘7=5’ check over it and take it off when necessary

5 Likes

Hi remember me? I coded a logo for you a while ago :smiley:

5 Likes

I KNOW YOU!
Oh my gosh sorry I’m just exited

I don’t recall the logo though, and this might not be the topic I’ll tag you somewhere else

4 Likes

Yeah I think the Hopscotch team should create a pre-made function, like drag me or draw like a pen

4 Likes

Bump

3 Likes