You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was having a strange issue where the links were not being properly redirected to for my QR code project. I really want to finish this QR code thing and get it behind me so I can start on something new, so I'm hoping to fix the bug now and be done with it. I wanted to be able to see all of the variables before the automatic redirect, so breakpoints were perfect so as to not lose the variables and data from the original page.
Here I first wanted to check to ensure that the backend call was working correctly. It's a pretty simple call and after analyzing this breakpoint I saw that this was not the issue.
This was the first breakpoint. It was within a for loop in which intervals is built, so I was able to analyze each new addition to intervals.
This is the first point, working as intended.
This is the second point, which is not working as intended. This should be 0.75, as it should add the previous value of .5 with the next frequency of 0.25.
This is the third and final interval being added. None of these intervals should be above 1 so it's not quite right, but actually it should have added .25 to the previous value which it did do correctly. It looks like this is the issue and why the code is not running correctly.
This second breakpoint was placed in case there was some issue with the comparison of num and intervals causing the bug.
Using this breakpoint I can see that it is functioning as intended. When i = 0, shown by the breakpoint as the current state, it should compare .622 < .5 and not return the function, continuing the loop. When I continue playing to find this breakpoint again, I see that this is the case and the next comparison works correctly (given incorrect input data).
Now it is compating .622 < 1, since i = 1 (again shown by the breakpoint). This in theory should redirect me to the page. And when I run the code....
It correctly redirects me to the second link. Through this process I identified that something is wrong with my logic creating the list of frequencies, and that's what I need to fix.
The text was updated successfully, but these errors were encountered:
Toby clearly explained each step of his debugging process and showed understanding of the code that he was working with. In addition, he had a valuable debugging session where he was able to fix an issue with his code that was apparent before the session and relevant to the project.
I was having a strange issue where the links were not being properly redirected to for my QR code project. I really want to finish this QR code thing and get it behind me so I can start on something new, so I'm hoping to fix the bug now and be done with it. I wanted to be able to see all of the variables before the automatic redirect, so breakpoints were perfect so as to not lose the variables and data from the original page.
Here I first wanted to check to ensure that the backend call was working correctly. It's a pretty simple call and after analyzing this breakpoint I saw that this was not the issue.
This was the first breakpoint. It was within a for loop in which intervals is built, so I was able to analyze each new addition to intervals.
This is the first point, working as intended.
This is the second point, which is not working as intended. This should be 0.75, as it should add the previous value of .5 with the next frequency of 0.25.
This is the third and final interval being added. None of these intervals should be above 1 so it's not quite right, but actually it should have added .25 to the previous value which it did do correctly. It looks like this is the issue and why the code is not running correctly.
This second breakpoint was placed in case there was some issue with the comparison of num and intervals causing the bug.
Using this breakpoint I can see that it is functioning as intended. When i = 0, shown by the breakpoint as the current state, it should compare .622 < .5 and not return the function, continuing the loop. When I continue playing to find this breakpoint again, I see that this is the case and the next comparison works correctly (given incorrect input data).
Now it is compating .622 < 1, since i = 1 (again shown by the breakpoint). This in theory should redirect me to the page. And when I run the code....
It correctly redirects me to the second link. Through this process I identified that something is wrong with my logic creating the list of frequencies, and that's what I need to fix.
The text was updated successfully, but these errors were encountered: