Remove anonymous debugger from Chrome Dev Tools - google-chrome-devtools

A while ago I was working on a webapp and for the purpose of debugging I've added a listener function directly in the console of Chrome Dev Tools and I've included a js debugger keyword in it to have a breakpoint there.
Now I can't get rid of that debugger and whenever I try inspecting the page, click on Select an element in the page to incspect it and I click anywhere on the page to take me to that node in the DOM structure I'm entering the breakpoint and I need to Continue script execution multiple times.
The debugged code looks like this:
I've tried triggering Never pause here option on each possible line, but it just opens a new VMxxxxx file. The breakpoint is not available in the Breakpoints list so I can't remove or uncheck it from there. Do you know how to get rid of it?

I was having the same issue, i found that one of my browser extentions was throwing the anonymous debugger. I solved the problem by disabling all my extentions, confirming the anonymous debugger issue went away and then reenabled one extention at a time.

Related

Blazor WASM PWA Could not find any element matching selector 'app'

I am using Visual Studio 2019 v16.8.5 and have a single Blazor WASM PWA project in my solution that I recently upgraded to .NET5. In between I got it to run, but lately I cannot get to start it anymore.
The screen says Loading... and that's it.
The console output (Firefox) shows the following error: Microsoft.JSInterop.JSException: Could not find any element matching selector 'app'.
At some point this was running without this issue, but even reverting the solution to an earlier state does not bring any change and I still get a blank screen.
I found a github source saying "just remove builder.RootComponents.Add<App>("app"); from Program Main". If I do this, the error disappears and I just get a blank page saying Loading... with no errors in Console output.
Additional information: I now do a full cache cleanup (cookies and website files) after running the project in Visual Studio to prevent any caching issues.
What am I doing wrong that I can't see any of my pages?
Even after explicitely calling them like https://192.168.188.31:5555/login?
Depending on the template version used to create the initial app, a slightly different HTML is used inside the index.html.
Older version could look like
<app>Loading...</app>
while newer should like
<div id="app">Loading...</div>
In case, the first is still true, the corresponding declaration should be
builder.RootComponents.Add<App>("app");
For the second the line should be
builder.RootComponents.Add<App>("#app");
The second uses the id selector #.
Usually, the index.html is seen as a "static" file and is cached by the browser. So changes, you have done in that file are not reflected immediately. The easiest way to disable the cache is to open the developer tools, go to the Network tab and disable the cache.

Executing Capybara commands on debug while using Capybara Webkit?

With Pry (but also with Rubymine), I'm trying to debug a certain point in the code (using binding.pry). After calling Capybara's save_screenshot, I'm unable to execute any Capybara related commands (all commands die on time-out). This works out of a "debug mode" and in other web-drivers like Poltergeist.
I took a couple of hours today trying to debug it. I think I found the problem - or at least a way around it.
Our web site has a couple of links that open content in another browser window. Since the automation is quite ancient, and in that time Selenium didn't have a decent way to switch window-context, what we do is to visit the opened page by URL, and by this keep only a single window open at any given time.
This works, but something strange happens when running this test on "debug mode" (using binding.pry for example). Right before we do any actions on that specific page, we take a screen-shot using Capybara's save_screenshot method. On debug this results a corrupted image, and any following Capybara methods will fail on time-out. Opening this page using the link, and handling the windows context switching with Capybara's handle_window method solves the issue. It's still a mystery why it only happens with Capybara wekit though (as other web-drivers work properly). I'm guessing that perhaps the DOM might be structured differently.

Chrome Devtools empty file-list

I need to inspect the website but my scripts are not listed.
I already tried to uninstalled chrome and resintalled it again.
If I pause javascript and trigger any javascript action it opens a VM-version of jquery but I need the real file, not the vm-loaded one.
Any idea?
A but or not?
Any workaround?
Following the discussion from the comments above, the issue was unrelated to the web app but the environment in which the Chrome instance was run in. It was likely a Chrome Extension or modified setting that caused this misbehaviour.
The resolution was to create a new Chrome Profile, since extensions and settings are not shared between profile instances. The next step may be to identify the particular extension or plugin at fault to avoid this happening again.

eclipse - class find editor - source not find

I have a problem with eclipse debugging. I had a proper working code and few hours ago I add one more external library to do something new. When I run the program now it works properly, but when I want to debug it, it stopped on the first line of a new part of the code (the one using the newest external library). It shows the info:
"Class File Editor
Source not found
The source attachment does not contain the source for the file ModelBuilder.class"
When I try to step over I just receive the same information but connected with other files. After stepping over a multiple times I finally get back to my code and can debug the rest of the program normally.
Of course I can do it always but does anybody know the solution to that problem, not to click step over multiple times but debug normally?
It should not enter the external library code unless you step into it, or there's an exception in that code. If you find yourself stepping through code you don't have source to, use Step Return, which jumps to the end of whatever method you're in.
If it is caused by an exception in the library code and you want to ignore it, go to Window > Preferences > Java > Debug and uncheck "Suspend execution on uncaught exceptions".
If you know what exception is causing the execution to suspend, then you could also try this:
Go to the Debug perspective
Open the Breakpoints view
Click the J with the exclamation point by it (J!)
Search for the exception that triggers the debug suspend
Uncheck the two check boxes
Say OK

Flex Builder Debugger doesn't display local variables

I am using the Flex Builder 3 debugger almost every day and it's starting to be a real pain that the 'Variables' tab in the 'Flex Debugging' view doesn't show local variables, only 'this' is displayed.
Also I can not add Watch Expressions for local variables.
Am I forgetting something here or is the debugger just very limited?
Thanks
I have the same problem that motto described. Local variables are not displayed when debugging, "hover" method doesn't work either. You can always use trace() or Loging API.
The problem occurred to me yesterday and the only thing I noticed is that the project stopped to compile using ant script due to OutOfMemoryError (I usually build project using FB, but sometimes FlexBuilder doesn't show errors/warnings and compiling via ant script is the only way I know to find them).
To see if Flex Builder is even tracking your local variables properly, set a breakpoint somewhere in a function. Once you hit that breakpoint, you can also "hover" over a variable in your source code, and a tooltip should show the current value of that variable.
Sometimes, FB has problems if the current function is further down in a larger file. Moving the function code up solves the problem (but exposes the same for another funciton further doen then). It seems that FB can only gather a certain amount of metadata for the currently open file.