VS2019 MS Edge Javascript Debugging with Razor Syntax - razor-pages

In Razor Page Model, breakpoint will not work if we mix that .cshtml or .js file with razor syntax.
But we were still able to insert the debugger keyword to the javascript and it will break.
However this feature is no longer working with the latest :-
Microsoft Visual Studio Community 2019
Version 16.9.4
Microsoft Edge - Version 90.0.818.39 (Official build) (64-bit)
It will stops at the point when it saw the debugger keyword, but the dynamically generated page (Razor .cshtml) is blank.

Please first check Enable JavaScript debugging for ASP.NET (Chrome, Edge and IE) option under Tools-->Options-->Debugging-->General.
Then, start debugging and set the breakpoint under the active Script Documents from Solution Explorer. Refer from this official document.
And you cannot automatically hit breakpoints on files generated with Razor syntax (cshtml, vbhtml). You have to try the following ways provided by the document.
If the steps it provided do not help with Edge, I think you should report a problem to the Team under VS menu Help --> Send Feedback --> Report a Problem.
As a suggestion, if my suggestion does not satisfy you, you can ignore it:
You would better not use Razor syntax under JS file. You could use a separate js file and then use write your js file and then import this single js file into cshtml.

Related

Excel JS Add-In Shared Runtime Work with IE11?

It looks like the shared runtime example on the page below is focused on situations where the Add-In browser is using edge (as opposed to IE11). I am not able to update the window.sharedState data and see the updates in my Task Pane. I can see the updates if I troubleshoot the add-in by hitting localhost with my Chrome browser. Any thoughts on how to make this work? I believe my browser is IE11 because my windows version is 1809.
screenshot of my add-in project

Using HTML Help Workshop 1.3 and HTML5 and Javascript DOM and targeting Windows 10 with HTML Help files?

I am working with HTML Help sources that were generated by converting an older WinHelp help sources (converted from the .RTF files that were edited with Word using a Microsoft conversion tool). This source has not been touched since it was converted and some preliminary work done sometime around 2014 or earlier.
I am currently using Visual Studio 2005 with a Windows 7 PC to update this HTML Help source. I have created a project and added all the various sources: HTML files, BMP files containing images, a file containing JavaScript and a file containing CSS. The older WinHELP based content used a lot of popups which the conversion put into individual files and by just merging these small files used in only a single place, I have reduced the number of files by a third.
The first thing I am doing is cleaning up tags by hand, eliminating files by merging and rewriting content, and changing the old style markup to use more modern CSS.
My target for the help files is desktop users of Windows 7 and Windows 10. I am planning to move to Visual Studio 2015 with this source once I have the basics cleaned up. I have done a test project converting the VS 2005 to VS 2015 and the conversion seemed to work fine and the HTML source to compile into a .chm file that was usable.
From what I can find, it appears that HTML Help Workshop from Microsoft is being maintained but is no longer under active development. The last version seems to be 1.32 published in 2012 though it is for HTML Help version 1.4 according to the HTML Help Workshop and Documentation download page. See also Microsoft HTML Help 1.4 in Microsoft Docs.
Visual Studio 2005 is indicating that some of the markup, which I think is HTML4, is deprecated. The html help source seems to compile to a .chm file fine anyway and the resulting .chm file works fine under Windows 7.
I am a bit confused about this compiling process. My impression is that the workshop compiler packs all of the various .html files together along with a couple of files it generates and then compresses it all into a single archive.
Does this mean that the HTML standard I use depends on the Microsoft browser, Edge I assume, and what HTML standard it supports?
This question really means is there any dependency in the HTML Help Workshop that means I can not use HTML5 or the newer CSS?
There is some, simple Javascript which uses div tags for some basic user interaction. That works just fine. Can I expect that whatever Javascript HTML DOM is supported by Microsoft Edge is available for use with this help text?
You know Windows HTML Help is delivered as a LZX compressed binary file with the .chm extension. It contains a set of HTML files, a hyperlinked table of contents, and an index file. The file format has been reverse-engineered and documentation of it is freely available e.g. Unofficial (Preliminary) HTML Help Specification
The file starts with bytes "ITSF" (in ASCII), for "Info-Tech Storage Format" (see Microsoft's HTML Help (.chm) format documentation). The CHM can be opened using FAR HTML like shown in the screenshot of this SO thread to get CHM details from help ID
Please note the aged Internet Explorer is used inside HTMLHelp Viewer (hh.exe) for rendering the HTML content. HH.EXE is distributed with HTML Help so you can rely on it being present. It lives in the Windows folder and has a limited number of command-line options. HH.EXE is associated with .CHM files. So double-click a *.CHM file and Windows will open the file using HH.EXE. Its a very small file like a wrapper, it mostly passes the help filename onto a HH API library.
The Edge browser is not used in this context. Many things still work with the more than 20 years old HTMLHelp, such as the integration of SVG. But, I recommend not to use the standard HTML5 completely and to be very careful. The content itself should be as easy to maintain as possible. This can also be achieved with a simplified HTML.
You may know Microsoft is building a Chromium-powered web browser that will replace Edge on Windows 10. I'm not sure how Microsoft will integrate the required Internet Explorer rendering engine to support the CHM Viewer in this future environment.
It's a bit dated but please read Make your CHM Help Files show HTML5 and CSS3 content . See as well Web Browser Control & Specifying the IE Version which discusses using the X-UA-Compatible HTML meta tag.
See this about that tag, What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do?.

Auto Save or Prompt before navigating away from text editors in Kentico CMSDesk not working

Auto Save or Prompt before navigating away from text editors in Kentico CMSDesk not working. I already set the Settings -> Content Management -> Prompt to save changes on exit to checked, but didn't work. Can somebody help me.
-Thanks in advance
What I would suggest is to enable the developer tools in chrome or firebug in firefox and check, if there are any javascript errors in your pages. it's possible that some custom javascript interferes with this check. Check for any errors and try to resolve them. Or, as a test, try creating a completely blank page in the content tree, with only an editable region and disable any master page inheritance so there won't be any custom code used on your page and test, if it works there. If it does, then keep adding your scripts and test to see which component or script is causing the issue. Also make sure your settings are enabled on a site level in the settings application.
Which version and hotfix do you use? I suppose you are using v7 (or less - because of CMSDesk). Please note there were some bug fixes related to prompt in CMSDesk (eg. in 7.0.80).
Content editing - The ‘Prompt to save changes on exit’ setting didn’t work correctly
You can find more information about hotfixes and fixed bugs here.
edit: after additional info (screen from your console) I think you have registered your own jquery and you don`t have registered it in no conflict mode. Can you agree? Could you register your jquery in nonconflict mode and try the prompt behavior again?

Glimpse HUD not showing

I am trying to integrate Glimpse into my existing ASP.NET MVC 5 project. But I cannot see any HUD at bottom right corner as demonstrated in their site. I have all of the assemblies downloaded from NuGet, using Visual Studio 2013 Ultimate and running in localhost.
Can anyone tell me what could be the problem? I am not finding any relevant topic online either.
#Md.lbrahim by looking at the comment replies of you above, it seems that Glimpse is indeed active and rendering its <script> tags.
Can you check with the browser developer tools whether the Glimpse client is actually rendered at the bottom but maybe hidden by another element that has a higher z-index?
If you still can't get the HUD to show up, then maybe create an issue on our issue tracker and try to provide as much details as possible (browser used, versions, other installed packages that might interfere with Glimpse rendering etc...)

Building coverage tool for chrome developer tools

I'm looking to extend dev tools in chrome to support 'what-just-ran'. Something like this - you click a record button, do something on the web page, and stop recording. In dev tools, it should show what part of the code ran - like dynamic code coverage. From what I read on the docs, there isn't any direct way. I have been hacking around with dev-front-end (source for developer tools) by setting breakpoints on every line and finding what line executed, that's about how far I could go. Is this project possible with current chrome extension APIs or even dev front end changes?
JS heatmap profiler slash code coverage tool does that by preprocessing JavaScript.
(source: google.com)
Timeline has all of this plus rendering and loading information. Timeline data is exposed via Remote debugging API as well as any other data DevTools has.

Resources