Auride
Auride
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Once you find a place where your expectations don't match reality, you should go backwards through the code and find where those variables are modified
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
then compare with what they actually are
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
in the demonstrated case, what do you expect each of these values to be the first time this line gets executed?
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
const buttonIndex = startIndex + index + 1;
const buttonIndex = startIndex + index + 1;
set a breakpoint on this line
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
That will make the problem easier to reason about without getting overwhelmed
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
I have a tip that might help: try coming up with a simpler test case. For example, try modifying the code so that there are only 1 or 2 items per page rather than 5, then see if the bug still happens
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Debug that specific case. Follow from inputs until something unexpected happens
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Break the calculation into steps until you can apply my expectation method
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
And then develop new expectations to test
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Either I find a place where my expectations are wrong, which usually leads to the bug, or I don't find anything and I can eliminate those expectations as causes of the bug
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Using the debugger
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
I don't know what you saw when debugging, but for me, I always find places in my code where I expect certain variables to hold certain values, and then I check if my expectations are correct
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
If you are capable of writing it, and you know there's a bug in it, you are definitely capable of finding the bug.
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
You know the code that handles pagination here has a bug. Did you write that code?
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Did you write the underlying code?
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Without having to make changes to the source files and restarting the process
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Keep in mind you can run code in the debugger console while stepping through, to try modifying values
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Yeah, just so you can keep trying and seeing what the result is
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
That could buy you some time to debug and still see the resulting response
74 replies
DIAdiscord.js - Imagine an app
Created by EndergamerMC on 6/27/2023 in #djs-questions
Pagination error
Is there a defer method for button interactions?
74 replies