Unable to remove logpoint
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(Not tracked)
People
(Reporter: egil, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Steps to reproduce:
- Debug script in the past.
- Set some logpoints with a variable.
- Some changes in the code. Days pass...
- Debug code again.
- FF complains: "variable is not defined".
Actual results:
I browsed code for hours to look for a bug ;-)...
When I set a global variable then I noticed the bug comes from a logpoint (viloteish mark).
There are no logpoints visible though.
I tried removing all of them and it didn't help.
Expected results:
Any of this would have helped:
- The logpoint should be visible at least in a sidebar.
- Removing all logpoints should remove all of them.
- Bug in a logpoints should be distinguishable from other bugs.
- Would be nice to have a global button/options to remove all logpoints and brakepoints everywhere (for all domains).
Note that I can still reproduce this bug if you need more information.
Comment 1•3 years ago
|
||
I will set DevTools: Debugger component for this one, it could be a good starting point so the engineering team could take a look at this issue.
Comment 2•3 years ago
|
||
The severity field is not set for this bug.
:Honza, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 3•3 years ago
|
||
Thank you for the report!
(In reply to Maciej Jaros from comment #0)
- Debug script in the past.
- Set some logpoints with a variable.
- Some changes in the code. Days pass...
- Debug code again.
- FF complains: "variable is not defined".
It would be very interested to have exact STRs, so we can repro on our machines. Can you provide more specific steps, please?
Modifying the source code and making the line with LP empty causes the LP to disappear, but it makes it disabled and it doesn't generate any output.
Any of this would have helped:
- The logpoint should be visible at least in a sidebar.
- Removing all logpoints should remove all of them.
- Bug in a logpoints should be distinguishable from other bugs.
- Would be nice to have a global button/options to remove all logpoints and brakepoints everywhere (for all domains).
I like these ideas. Also, there is a bug 1742774 where we want to improve the UI for removing all BPs (and LPs).
Comment 4•3 years ago
|
||
The severity field is not set for this bug.
:Honza, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 5•3 years ago
|
||
Please see the comment #3. What would be great help is precise STRs
Updated•3 years ago
|
Reporter | ||
Comment 6•3 years ago
|
||
Sorry, I don't know how to reproduce. I cannot even repeat on my computer any more. But...
My guess is the problem occurred when the code shifted (changed) after setting a logpoint.
And I can reproduce something that might be related:
- Add some code like this (the code itself probably doesn't matter):
someGlob = 123;
function testFun() {
console.log('[test]', 'fun, fun, fun');
var a = 1;
for (var i = 0; i < 10; i++) {
a+=i;
}
someGlob += a;
}
document.querySelector('body').onclick = () => {
testFun();
};
``
2. On line `var a = 1;` add a logpoint that checks `someGlob`.
3. Comment out above line `// var a = 1`.
4. Refresh -> Logpoint is gone. I cannot remove it.
So the error would occur if you considered some line not to be executable (logpoint would be hidden), but the line would actually get executed.
And also I would consider behaviour at point 4 wrong too. The logpoint should still be visible in a logpoint list, but maybe crossed out or with some broken icon (e.g. cracked square or something like that). That way I should still be able to remove my logpoint.
Reporter | ||
Comment 7•3 years ago
|
||
Attached a micro site on which I tried above steps. I would guess this is repeatable with any code, but just to be sure...
You can also just remove whole js contents and the logpoints will not be shown on the list, but will actually still be somewhere. Once you revert the code the logpoint will appear on the list.
Comment 8•3 years ago
|
||
Thank you, Maciej!
I could reproduce the problem on my machine.
My STR:
- Create a Log point on any line with code
- Check the Breakpoints side panel in the Debugger panel => it should be in the list
- Modify the source code and make the line with the LP empty
- Reload the page and check the Breakpoints side panel => it's empty => BUG (it should not be empty, the LP still exists)
- Undo the changes in the source code
- Reload the page and check the Breakpoints side panel => it shows the LP again
Honza
Comment 9•3 years ago
|
||
The severity field is not set for this bug.
:Honza, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Description
•