[[SCOPES]] missing on chrome dev tools - closures

If i run console.dir(..) for a fn, chrome does not display the [[SCOPES]] on the dev tools anymore at least since the December 6th update! It shows on EDGE(ms).
chrome version 108.0.5359.125
this prevents me from getting the closure...

Same Problem, and you can inspect closure by using a debugger statement in your code. Later, press F12 to sources pane. You will see a scope tab and there the closures will be listed.
sources pane

Related

Unable to debug Blazor hosted webassembly 3.2.0 from Visual Studio 2019 16.6.2

I have Visual Studio 2019 16.6.2 installed, along with the .NET Core 3.1.301 SDK and all the necessary Blazor templates.
If I create a brand new Blazor WebAssmbly application, I can run it from Visual Studio by pressing Ctrl+F5 and it opens a new tab on my active browser window and starts fine.
But when I press F5, a new, separate browser window is opened (which is midly annoying), but the page remains at about:blank for a while until an error message appears in Visual Studio:
Failed to launch debug adapter. Additional information may be available in the output window.
Unable to launch browser:
"Could not open wss://localhost:5001/_framework/debug/ws-proxy?browser=wsAFFlocalhostA50821FdevtoolsFbrowserFceed3b95-58ac-470a-b10c-5d139cfd7117": timeout after 60000ms
Whether the Blazor WebAssembly application is "Hosted" or not doesn't make a difference.
I've followed the steps in the Enforce HTTPS in ASP.NET Core, but that made no difference.
If, while waiting for the about:blank window to crash, I manually open the client side url on a browser tab, the app loads and the debugger breakpoints are hit.
During the short while before it goes on to crash, if I hit Shift+Alt+D I always get the following error:
Unable to find debuggable browser tab
Could not get a list of browser tabs from http://127.0.0.1:9222/json. Ensure your browser is running with debugging enabled.
Resolution
If you are using Microsoft Edge (80+) for your development, follow these instructions:
Press Win+R and enter the following:
msedge --remote-debugging-port=9222 --user-data-dir="C:\Users\sergi\AppData\Local\Temp\blazor-edge-debug" --no-first-run https://localhost:44372/
I get this each and every time, no matter how often I run the command (having closed all browser instances, rebooted, etc).
This happens in both Edge 84 (Edgium) and Chrome.
I should be able to create a new Blazor WebAssembly app and hit F5 on Visual Studio out of the box. What am I missing?
UPDATE
I've just tried using "old Edge" (EdgeHtml) and Firefox as the debug browser in Visual Studio, and both work as expected (meaning that the application at least starts up when pressing F5). The problem apears to be both Chromium-based browsers then...
UPDATE 2
#JamesHancock posted an easy enough workaround in the comments. For a full resolution (and explanation), I've logged a Github issue with the ASP.NET Core team.
for me I was missing app.UseWebAssemblyDebugging(); in Startup.Configure(). Hope this helps someone.
Had a project that loaded perfectly fine. Left it for a couple of weeks and when I opened it again tonight, I got this issue.
In launchsettings.json I had this (all default values from the project template, I hadn't changed anything)
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
I removed this line
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
Pressed F5 and it worked!
And then I inserted it again and it still works.
It appears that the issue is that if you remove the IIS Express section from the launchSettings.json file of your project, that debugging will then fail to work. And this is true even if you're using VS code against the project directly without IIS proxying or VS.net too.
So the solution is to put back the IIS Express section in the launchsettings.json file and not remove it until this is fixed.
After searching for couple of days, I did the following and it worked like charm:
1.Install IE "Microsoft edge"
2.Use IE "Microsoft edge" as your VS. browser (NOT CHROME)
3.Use your application as server (NOT IIS EXPRESS).
Enjoy.
The problem for me occurs if I select the Configure For HTTPS option when creating the project.
As a workaround,
for an HTTPS configured project changing is settings-sslport, to 0
applicationUrl to only http://localhost:port in launchsettings.json
I think the debug adapter has an underlying security related problem. Good luck!
I had this issue as well and I solved it by unticking "Enable SSL" under "Web Server Settings" in project properties.
Obviously disabling SSL is undesirable is nearly all situations but works in my use case.
For a better solution if you're developing on Windows 7 check you have the KB installed that has modern TLS needed for IIS SSL which caused problems with SSL in non chromium browsers.
I had the following configurations
.NET - 6
Visual Studio 2022 Community edition
Browser - Google Chrome
I have tried all of the solutions above. But none worked for me. Then I tried changing the browser from Chrome to Firefox. Firefox gave me a different error message and it was pointed towards updating .Net version.
I simply updated VS 2022 from version 17.3.3 to 17.3.5 and problem solved. Hope someone will find this helpful
This sounds extremely naïve but this was the entire problem for me.
I didn't notice this line was removed in the diff.
Make sure your main builds and runs the CreateHostBuilder function.
This unfortunately causes the same error above but is not at all directly related.
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
...
public static IHostBuilder CreateHostBuilder(string[] args)
...

Glimpse.AspNet.pdb not loaded

I have an MVC application which uses Glimpse and for the last couple days I haven't been able to solve it. It throws a null reference at the start of each run.
I have tried clearing caches, reinstalling the nuget packages, and tried clearing out the local repo and pulling it down again.
The program builds and works fine with Glimpse working on others environments and on mine it works if I continue past the error but leaving it as is is feels concerning.
Go to Tools -> Options
Make sure that the Enable Just My Code option is enabled and the Enable .NET Framework source stepping deactivated:
I tried all of the interventions above and still no joy. Our app was built on a framework that uses glimpse, but it's an old product. I checked the 'Except when thrown from Glimpse.aspnet.dll' checkbox, clicked run, clicked stop, just to make sure it saves, and then clicked run again and life is good.
Suggestions on vbforum did not help.
Uninstall and install of VS 2019 worked partly due to enabled option "Enable Just My Code" placed in Debugging -> General otherwise error is still present.

Why is the program still running while Error FS0039 The type 'JsonProvider' is not defined?

I'm trying to learn Fsharp.data with the example of JsonProvider, but I can not understand why I'm still running the program while compiling the error.
You may have clicked "Yes" when VS asked you if it should run the last successful build when compilation fails.
See here for how to change the setting.
There are plenty of issues like this with F# in Visual Studio, but the situation also improves all the time in VS 2017. I believe one possible workaround for this particular issue is to restart VS.
But there is also another way, which works better to avoid an inconsistent Error list pane in general. Change from "Build + Intellisense" to just "Build" in the dropdown in the Error list pane, and see how that works for you. It means you have to compile to refresh the Error list pane, but you still get (sometimes inconsistent) Intellisense help in the editor panes without having to recompile.
If you want to know more about F# issues in VS, this is where to look:
https://github.com/Microsoft/visualfsharp

Official Dart Polymer samples not displaying in Chrome (work in IE)

https://www.dartlang.org/samples/
I have the latest version of Chrome Version 34.0.1847.131 m
None of the polymer samples work in the browser, I just get a blank box where the sample should display.
I tried on IE and Firefox, 4 of 6 samples work fine (none work on Chrome).
Defining a custom element - broken
Searchable List
Get input from a form
TodoMVC
Polymer and internationalization - broken
A task management tool
Is there something I need to do to get them working?
Background - I want to develop the equivalent of a desktop application that I can run in the browser as a learning experience and try to use a widget UI library.
There's nothing you should need to do for these to work. They all work for me in latest (stock) stable Chrome without any adjustments (36.0.1985.143 (Official Build 287914) m).
I would check the console for errors (press F12 to open the dev tools), and also try in Incognito Mode (which should disable most/all extensions) to see if there are any clues.

Is there an "Immediate Window" in the Dart Editor / Debugger?

Is there any way to try Dart expressions and execute commands while in a debug breakpoint?
Like in Chrome Developer Bar, Firebug or Visual Studio Immediate Window.
Unfortunately not yet.
Star http://dartbug.com/3293 to track its progress.
A similar feature, a REPL (read-eval-print-loop) is tracked with http://dartbug.com/4409.

Resources