I want to know how we can debug a application ex: facebook in chrome, how we can stepover each backend actions when we login into facebook. How the flow goes in backend when we login into FB...
can we do this in chrome without setting it any breakpoints ?
can we do this in chrome without setting it any breakpoints ?
As far as I know, it cannot be done. If you want to debug your project, you have to set breakpoint. Besides, you should have the sample and should use the localhost to debug it.
First of all, you should open the prject on VS and then debug it with Chrome.
1), when you debug an asp net project, it usually have naming rules. If you open a new form page in Chrome, you can find the related page on the solution explorer, and set a breakpoint on the top of it.
2) Chrome can only debug Javascript code. If you want to debug it, you should press F12 on Chrome to open the developer mode. You can see that the JS code of the current page is under the Source menu, you can set a breakpoint directly at the beginning of the script.
Then you can click on the UI button or menu to start debugging(both js and backend activity ). Also, when you enter a new form page, just follow the above two steps to debug it.
In addition, since VS2017, you can just debug js in VS, enable option Enable Javascript debugging for Asp.Net under Tools-->Options-->Debugging-->General.
Then, you can search under the solution explorer, find the current debug form page-->find the related js file, and set a breakpoint on the top of it. After it, you can start to debug the menu of asp net project.
Note: every time you enter a new page, you should search both front end and back end pages to set a breakpoint manually.
Related
The Chrome dev team apparently just rolled out a new "feature" called SuppressDifferentOriginSubframeJSDialogs, which makes it so alert+confirm boxes from an iFrame on a different domain than the parent does not show up, by default: https://www.chromestatus.com/feature/5148698084376576
This means if you have an embedded form, and you relied upon the standard JavaScript alert to inform the user of errors (or a confirm to ensure they want to make a change), it now does nothing, completely destroying the UX.
Obviously we can overwrite the built-in alert and confirms with custom ones, but moving away from what is built into the browser now introduces re-designs for every UI (mobile, tablet, laptop, desktop, etc.) instead of just relying upon proven, built-in technology.
Is there a way to change this cross-domain setting, or to whitelist specific domains to override this feature? We do have access to the parent site with an external JS include file (obviously, otherwise this would be a wide-open back door).
To Disable SuppressDifferentOriginSubframeJSDialogs , which block js Dialog box pop up
If you are single users ( Windows ) :
Right click on desktop and create a shortcut
Windows will pop up a screen and ask you "type the location of the item:"....now paste those value into the textbox
"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-features=SuppressDifferentOriginSubframeJSDialogs
Click "next" then "finish" button to create the shortcut
Now you shall see a chrome shortcut created in your desktop .Close all active Chrome instance ( if exists ) then launch the shortcut and you will found Js pop up wont block anymore.
Tips :
If you want push this fix to all your cooperate domain users , you may consider use Domain group policy to update Chrome shortcut value or use custom domain logon script logic to do so
I found a setting in the latest Chrome GPO template that creates a reg entry that will deal with this and the same reg entry placed in the Edge location also resolves the error there. (at least it worked for the problem that came up for us yesterday FWIW)
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"SuppressDifferentOriginSubframeDialogs"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
"SuppressDifferentOriginSubframeDialogs"=dword:00000000
The latest Edge GPO templates do not have the setting yet, but I imagine it's only a matter of time.
Today I tried it again with Google Chrome Version 92.0.4515.131 and it suddenly worked again. Can anyone confirm this?
Add for Mac users.
If you use mac OS:
Quit all running instances of Chrome.
Run the terminal application.
In the terminal, run the command:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-features="SuppressDifferentOriginSubframeJSDialogs"
You can see more details here :
https://trailblazer.salesforce.com/issues_view?title=salesforce-functionality-impacted-in-[%E2%80%A6]oss-origin-iframe-javascript-dialogs&Id=a1p4V000002BRMX
I use WebStorm 10.0.4 on Windows 7.
I have a single page Angular application that I am working on in WebStorm. Up to this point I have always been able to preview my built app in Chrome using WebStorm's "Open in Browser" feature.
This morning however, the problem started. Every time I try to open up my project's index file in the browser, the page becomes unresponsive and eventually Chrome prompts me to kill the page. I cant even open developer tools.
Anyone have any idea why this may be happening?
Hello I am new to Weinre and I need to debug my website which seems to act strange when opened using an IOS platform.
So I am using Weinre to debug it. I installed the tool and tested it running with the demo targets in the server itself.
Now I need to add my website as a target and run it with an iphon (or ipad) and debug it with Weinre. I don't know how to add my website as a target, I cannot manually add the
<script src="http://123.456.7.89:8080/target/target-script-min.js#anonymous"></script>
script (do not have permission to manually change the page). so How can I do my debugging with Weinre?
Thanks
You can try using a bookmarklet. The main weinre server page actually has a bookmarklet in it, for itself, that you should be able to use directly, if you can figure out how to set up a bookmarklet for your device. This seems to change release-release for mobile browsers, so you might want to do a google search on "bookmarklet" and your device's name or the OS release, to see if anyone has any tips.
I'm experiencing a strange intermittent issue with Chrome Developer tools hanging on to old versions of JavaScript files. I'll be developing some JS app, things humming along just find, and then all the sudden my JavaScript files will disappear from the list of JavaScript files on the "sources" tab. This is my first clue that something is wrong.
What I eventually discovered is that Chrome Developer Tools is, apparently hanging on to an old version of the JavaScript file. Chrome itself is requesting and executing the latest version from the server, but you can't debug the JavaScript file.
I "proved" to myself that this was what's happening by taking a particular JavaScript file that had disappeared from my sources list, and replacing it with a one line console.log statement.
I then reloaded the page, and noted that the console.log statement appeared in the JavaScript console. I also noted in the Network tab that the JavaScript file was successfully retrieved, and that what came down over the wire contained just the one line console.log statement.
However, the JavaScript file still didn't appear in the sources list, and if I clicked on the filename in the console (where it appears on the righthand side of the console, next to the logged statement), then I jump to the sources tab, and an old version of the JavaScript file is opened.
This JavaScript file is loaded onto the page via a regular <script> tag. It is not loaded dynamically, via another script, or via eval. Just a plain, vanilla <script> tag that points to the .js file on the webserver.
I've tried:
Ensuring that "Disable cache (while DevTools is open)" is checked in the DevTools settings.
Manually clearing out my cache and cookies in Chrome.
Restarting Chrome
Manually loading the JavaScript file in a separate Chrome tab
Disabling every Chrome extension/app that I have installed
Running the page in incognito mode
Uncheck both "Enable JavaScript source maps" and "Enable CSS source maps"
None of these changed the behavior. You can watch a video demonstrating this here, if you don't believe me!
I do think it's a Chrome issue, as I can use Firefox without this issue... but I really like Chrome and Chrome's developer tools :-) So I'd like to get this working in Chrome...
Update I reported this as a Chrome bug here. If this bug is affecting you, or important to you, please vote it up and/or add comments with additional information.
Chrome DevTools works fine for me. When I load it for a page it remembers beyond the lifespan of the chrome process what sources I have open; although it gets the order wrong. I see two differences in our devtools prefs: disable cache and enable maps. So I would advise:
1) uncheck disable cache (while DevTools is open),
2) (if 1 didn't work) press the "Restore defaults and reload" button.
The issue persists in 78.0.3904.97. To fix it run settings > advanced > reset.
Some code editors such as rubymine cache js files.
To solve for rubymine: File > Invalidate Cache/Restart
As suggested here https://groups.google.com/d/msg/google-chrome-developer-tools/2rolf--fJ3M/UTJQaZN3K28J, for development environment I added these headers when serving a sourcemap:
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0
and it seems to do the job (at least for now).
I'm studying webview in packaged apps of chrome and I'm studying browser sample from chrome.
in browser.js file in onload function, I added alert("webview apps"); at the first row and the code didn't work anymore, when I deleted this row, it worked again.
onload = function() {
alert("webview app");
var webview = document.querySelector('webview');
doLayout();
...
}
so does alert work on packaged apps?
P/s: console.log also doesn't work, I saw the source code use it, but nothing is displayed on inspect element window
Console.log should work, it all depends on what view you are looking at. For example to get to the logs when in a window, you have to "Inspect Element" on the page to get to it.
Alert has been disabled along with confirm and a number of other legacy web features.
This sounds like debugging. And if you want to debug a packaged app, the Developer Tools should be enough to replace alert (and other dialogs). But the Developer Tools are not enabled by default. You can enable it on the chrome://flags/#debug-packed-apps.
Check this out this blog post for an example.
You can set up your package app to run in a sandboxed mode, but this will not allow access to any of the api's that manipulate the page.
http://developer.chrome.com/apps/sandboxingEval.html
This will essentially allow the app to run in its own environment allowing you to view the app as you have programmed it. This is done for security of creating apps. Console.log works perfect. When you go to inspect element and then select console in the inspect element view you should see any "echo" results you wanted printed.