Open Bug 1746287 Opened 3 years ago Updated 3 years ago

Unable to remove logpoint

Categories

(DevTools :: Debugger, defect, P3)

Firefox 95
defect

Tracking

(Not tracked)

People

(Reporter: egil, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file console-export-2021-12-15_23-46-1.txt (deleted) —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

  1. Debug script in the past.
  2. Set some logpoints with a variable.
  3. Some changes in the code. Days pass...
  4. Debug code again.
  5. 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.

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.

Component: Untriaged → Debugger
Product: Firefox → DevTools

The severity field is not set for this bug.
:Honza, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(odvarko)

Thank you for the report!

(In reply to Maciej Jaros from comment #0)

  1. Debug script in the past.
  2. Set some logpoints with a variable.
  3. Some changes in the code. Days pass...
  4. Debug code again.
  5. 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).

Flags: needinfo?(odvarko)

The severity field is not set for this bug.
:Honza, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(odvarko)

Please see the comment #3. What would be great help is precise STRs

Flags: needinfo?(odvarko) → needinfo?(egil)

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:

  1. 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.
Flags: needinfo?(egil)
Attached file logpoint-test.zip (deleted) —

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.

Thank you, Maciej!

I could reproduce the problem on my machine.

My STR:

  1. Create a Log point on any line with code
  2. Check the Breakpoints side panel in the Debugger panel => it should be in the list
  3. Modify the source code and make the line with the LP empty
  4. Reload the page and check the Breakpoints side panel => it's empty => BUG (it should not be empty, the LP still exists)
  5. Undo the changes in the source code
  6. Reload the page and check the Breakpoints side panel => it shows the LP again

Honza

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true

The severity field is not set for this bug.
:Honza, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(odvarko)
Severity: -- → S3
Flags: needinfo?(odvarko)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: