web-inspector

How do I step through Cordova code when the app starts?

房东的猫 提交于 2019-12-06 20:47:45
When I debug a Cordova app what I constantly do is step through its code inside Chrome's WebInspector. In order to be able to do this, however, I have to wait for the device to become ready in chrome://inspect/#devices (only then can I click on the appearing link for the started app). But if I do this the inspector will not halt on breakpoints if I am not quick enough. How do experienced Cordova developer tackle this issue? Additionally to frank's comment I just found GapDebug which offers instant debug and, thus, comes close to what I deserve. 来源: https://stackoverflow.com/questions/28046814

“Just My Code” in Chrome JavaScript debugger

廉价感情. 提交于 2019-12-06 20:02:31
问题 Is there a way to force Chrome's debugger to skip specific source files or functions when stepping through code? 回答1: This is now available in Chrome Developer Tools as the "Framework blackboxing" feature: https://developer.chrome.com/devtools/docs/blackboxing Updated link: https://developers.google.com/web/tools/chrome-devtools/javascript/reference#blackbox 回答2: Chrome does not have this feature, nor does any other Javascript debugger that I am aware of. 来源: https://stackoverflow.com

How do you determine what is overriding your style? [duplicate]

对着背影说爱祢 提交于 2019-12-06 16:44:42
问题 This question already has answers here : Chrome Developer Tools: How to find out what is overriding a CSS rule? (3 answers) Closed 3 years ago . When fiddling around with styles of sample code, I find the code has styles that will override my style because they will use a higher priority reference (e.g.: .div .class > .class ). I will encounter situations like this: How do I find out what style is overriding my style? I want to avoid using !important because eventually I'll end up in the same

How can i identify element by model or by name in this the following example?

旧城冷巷雨未停 提交于 2019-12-06 12:25:10
问题 I 'm using protractor to automate my tests, in order to click into the login button the action couldn't be executed when i tried to identify element by name, xpath, id ... element(by.name('Login')).click(); It works only when i identify it by css : element(by.css('.login-button')).click(); or element(by.css('button[ng-disabled=clicked]')).click(); But the problem the test is passed and user isn't redirected to home page even if i put browser.sleep(8000); Is the login button identified by the

Javascript debugging in Chrome Inspector: variables are shown undefined in watches and console but can be inspected when hovered

馋奶兔 提交于 2019-12-06 05:04:34
While debugging AngularJS in Chrome inspector I often face the situation when I know that some variables are defined, and I can inspected them by hovering a mouse over them in Chrome inspector. They also appear in 'locals' tab. However, when I try to add them to watch tab or evaluate them in console by typing the variable name I get "undefined". See picture(notice variable 'xhr'). Can anyone explain the reason why sometimes variables are shown as undefined in watch tab and console, when they aren't actually undefined in current scope? And, if it's possible, how to make watch window and console

Chrome can no longer log inspectable jQuery objects from scripts [duplicate]

青春壹個敷衍的年華 提交于 2019-12-06 01:29:45
This question already has answers here : Closed 6 years ago . Possible Duplicate: How do I console.log a jQuery DOM Element in Chrome? In the latest stable Chrome 23.0.1271.101, and Chrome Canary 26.0.1373.0, running the following code from a script: $(function(){ console.log( $('body') ) }) Now returns: [<body>, prevObject: jQuery.fn.jQuery.init[1], context: #document, selector: "body"] Hovering over this log out does nothing, it is not inspectable. The interactive console still works, eg, typing: console.log( $('body') ) Will correctly respond with: [<body>...</body>] When the mouse is

Javascript listen for style changes made in developer-tools

混江龙づ霸主 提交于 2019-12-06 01:14:55
Is there a way to detect style changes made only in the developer-tools (inspect element)? I want to allow to save them if the user is logged in as admin. You can access the styles of a HTMLElement using element.style in JavaScript. So you could probably save the styles on page load, check them again when the user initiates a save and compare -- the difference would be the users changes. As for detecting them as soon as they happen, you can use MutationObserver to get notified of attribute changes on the page. This works for when you add styles to a specific element in the Devtools, but not

Is there a way to determine a line from which XHR was issued in firebug or web inspector?

时间秒杀一切 提交于 2019-12-05 10:45:39
Is there a way to determine a line and filename from which XHR was issued in Firebug or Web Inspector (maybe Opera Dragonfly/IE Developers Toolbar)? If there isn't, what is the best way to find that out? Just searching the codebase for the URI called? (often it will be constructed, though) In Developer Tools(chrome) you can set breakpoints for any XHR from the Script tab. Script Tab XHR Breakpoints(on right hand side) Click the + and press return A new item will be added saying "Any XHR" Run the script and it will break on any XHR :-) For Firebug you can start with http://getfirebug.com/doc

“Just My Code” in Chrome JavaScript debugger

泪湿孤枕 提交于 2019-12-05 01:18:56
Is there a way to force Chrome's debugger to skip specific source files or functions when stepping through code? kpozin This is now available in Chrome Developer Tools as the "Framework blackboxing" feature: https://developer.chrome.com/devtools/docs/blackboxing Updated link: https://developers.google.com/web/tools/chrome-devtools/javascript/reference#blackbox Chrome does not have this feature, nor does any other Javascript debugger that I am aware of. 来源: https://stackoverflow.com/questions/6295502/just-my-code-in-chrome-javascript-debugger

Can't inspect scope variable when using strict mode

我只是一个虾纸丫 提交于 2019-12-05 00:59:28
When running the following script in Safari (with the Inspector open) window.onload = function() { "use strict"; var x = 1; debugger; // debugger will auto-break on this line } I get the following error when asking for x in the console while being on that breakpoint: Error message: "'with' statements are not valid in strict mode" Removing the "use strict"; line lets me access x from the console while on that breakpoint. Both times the x is shown under Scope Variables in the sidebar. This appears to be a known issue with Safari: https://bugs.webkit.org/show_bug.cgi?id=65829 To reproduce the