w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
WebStorm debug mode doesn't hit breakpoints
I have the same situation as yours, except that I'm building my app using Backbone.js and RequireJs and the app is running on localhost. My app can run in debug mode in Chrome but the breakpoints cannot be hit. I solve the problem by mapping the Remote URL and my local directory. You can define this in your JavaScript debug configuration profile in the Run->Edit Configurations. You can refer to this wonderful tutorial: Debugging your JavaScript app using WebStorm. Happy debugging!

Categories : Google Chrome

Shortcut to quickly run a project from a Javascript in WebStorm?
To have the application opened in a specific browser of your choice, choose View | Web preview on the main menu or press Alt+F2. Then select the desired browser from the pop-up menu.

Categories : Javascript

Webstorm: how to exclude javascript from code completion in typescript project
Right click on the folder that contains your compiled javascript and select "Mark Directory As" then "Excluded". WebStorm will hide the directory from the project view, stop indexing it for searches and code completion, and not include it in code refactoring tracing. I tend to mark all build output as ignored and ensure that WebStorm is only worrying itself with the source.

Categories : Typescript

is there any IE javascript debugger?
There is. If you hit F-12 in later versions of IE, you'll get IE's dev tools. They're nowhere near as good as what's in Chrome or FF, but you can check ajax requests, inspect the dom, inspect and set breakpoints in JavaScript code, and even emulate previous versions of IE.

Categories : Javascript

Is there any JavaScript debugger for IE < 8?
You can use Firebug Lite. Simply include the following code in your master page: <script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>

Categories : Internet Explorer

Qt Creator debugger doesn't show text contents of char* and wchar_t* variables
You have to keep in mind that a char* is a pointer to a char. It's not a string by definition; it's just a pointer to a char. So the debugger can't really assume that it's a string, unless you explicitly tell it to. To do that, right click on it in the watch window, select "change local display format", and there you can change how the debugger should interpret either just this one variable or all char* pointers.

Categories : C++

JavaScript: is it possible to alias the 'debugger'?
debugger is a keyword and it's not possible to delegate it's special meaning to a variable (you will find a similar question about aliases here). You can wrap debugger with a function: d = function() { debugger; }; and invoke it using d(). It will shorten the syntax, but you will have to always travel one level up in the call stack to get to the code that you are actually trying to debug. In my opinion you should simply set up a snippet (or a "live template") in your editor/IDE that will replace key combination d + TAB with debugger;. Snippets in Sublime Live templates in WebStorm Code templates in NetBeans

Categories : Javascript

In debug mode, mocha doesn't stop on debugger statements in a spec file when using node-inspector
It seems that everybody should be seeing the same problem with node-inspector version 0.2.0beta4. The problem is in the way how breakpoints are managed: The front-end remembers break-points in browser's local storage and restores them after the relevant file is loaded. When you start mocha with --debug-brk and stop on the first line, your specfiles are not loaded yet, so the front-end does not restore your breakpoints. When you resume mocha execution, front-end can't restore breakpoints quickly enough in the short window between a specfile is parsed and run. In fact mocha may exit before the V8 debugger has a change to notify front-end about new scripts being parsed! Another workaround for this issue is to add debugger; statement in the specfile where you want to trigger a breakpoint.

Categories : Node Js

GWT DevMode don't reload changes on css files
Unless you are directly changing the css file that tomcat is referencing, you will not see the changes in dev mode. I believe that when you deploy via tomcat in eclipse, your code is not referenced directly from the eclipse project workspace, a copy is moved to the tomcat webapps folder. I'm not sure what the standard way around this is. I feel like there has to be an option to refresh static resources to the tomcat instance from eclipse, but I haven't looked into it. Here are two ways i've gotten around the issue when I needed to: 1) You can put CSS code in your ui.xml files, and that should get picked up by devMode. Tutorial on how to add css to your ui.xml 2) You could also modify the css file in the webapps folder directly, then migrate any changes you made back to the works

Categories : CSS

phoneGap 'weinre' debugger javascript error
Check this question and YouTube tutorial; it may help you debug your app with weinre;

Categories : Cordova

please explain this javascript debugger output regarding Date constructor
The Invalid Date is normal. That is just what the debugger prints for the proto object of a Date. I believe this is because the debugger calls the toString method on the proto object without supplying the actual Date instance, and so the toString method returns "Invalid Date". I suggest you read the MDN documentation on Date. You can just use new Date(caldate) to create a Date from your string.

Categories : Javascript

Javascript redirect only seems to work when chrome debugger is open
Instead of window.location.href = theHref; have you tried window.location.replace(theHref);? Back to basics, try: window.location = theHref;

Categories : Javascript

Content script doesn't re-execute on page reload
Some links in facebook call ajax functions, so most of time clicking on a link in facebook doesn't change the page, just loads content via ajax. So your content script executes only once. There are two possible solution, You can also add a DOM change listener like DOMSubtreeModified, and run the code every time when content is changed. You can add CSS code to page, so it doesn't need to be run every time even if page is changed via ajax. Like this, manifest.json { "name": "NewsBlock", "description": "NewsBlock - Facebook Newsfeed Hider", "version": "1.0.0", "background": { "scripts": ["background.js"] }, "permissions": [ "tabs", "http://*/*", "https://*/*", "storage" ], "browser_action": { "default_title": "NewsBlock", "default_icon": "icon.png"

Categories : Facebook

I'm trying to automatically reload a div after some seconds but it doesn't work in Chrome
You should be safer with something like this: $(document).ready(function(){ setInterval(function(){ $.ajax({ type: "GET", url: "ajax_files/manage_friend_requests.php" }).done(function(result) { var $friends_requests = $('#all_friends_requests'); if ($friends_requests.length > 0) { console.log('Received: '+result); $friends_requests.html(result); console.log('UPDATED friends requests'); } else { console.log('CANNOT access friends requests container'); } }); }, 9000); }); Depending on what the console will display, you will probably put the issue in evidence.

Categories : Ajax

JavaScript redirect not working and works only in Chrome if debugger is turned on
If window.location = "something" fails that is because one of two possibilities: The code is not being executed because your ajax query is not succeeding (can be some problem with your back end, use console.log at the beginning of the success function in order to detect if it gets executed). "something" is exactly the same url that is currently in your browser navigation bar, so it actually is working. Don't use these because they are completely wrong (the other two methods are correct): $(location).attr('href', newUrl); window.location.replace(newUrl); The correct methods for redirecting are these (either will work crossbrowser): window.location = "something"; window.location.href = "something";

Categories : Javascript

Javascript & Chrome Debugger: "Uncaught SyntaxError: Unexpected token } "
Most probably your xmlhttp.responseText contains a quote mark (') and it truncates your alert message. Check the generated page source and see if that's the problem. NOTE: I know this should be a comment and not an answer but I still can't comment OP's questions.

Categories : Javascript

PHP unlink file using AJAX doesn´t return result to javascript after unlink files
Hard to fix when you don't show your JavaScript code, but this worked for me! function send(){ if (xmlHttp.readyState === 0 || xmlHttp.readyState === 4) { xmlHttp.open("POST", example.php, true); xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHttp.onreadystatechange = handleServerRespons; xmlHttp.send("what ever you want to send"); }else{ setTimeout('send()', 1000); } } function handleServerRespons(){ If you want to use response text (this do not work with IF statements): if (xmlHttp.readyState === 4){ if (xmlHttp.status === 200){ if(url === 'sections/verify.php'){ var text1Response = xmlHttp.responseText; If you want to use xml:

Categories : PHP

how to fix spurious runtime errors in Visual Studio 2010 javascript debugger
I've had the same problem before- VS was stopping on a commented out line in a javascript file. This is how I fixed it in IE11: Press F12 to open the development tools. Choose the Network tab (looks like a wi-fi router), then select the button for "Always refresh from server". This does what it says: ignore the cache and get the current file. Oddly, clearing the cache had no effect, but turning this setting on did the trick.

Categories : Visual Studio 2010

Why won't my VS2012 recognize modified files on disk and reload?
I don't have VS2012 (I went up to 2005), but from what I remember, this is configurable from the IDE. In VS2005 go to the menu, choose Tools, then Options, then Documents, then you'll see the options to detect when files are changed externally, and to auto-load files changed externally. I think in VS2012 it'll be similar.

Categories : Visual Studio 2012

How do you dynamically reload fish config files as you would in bash?
Use source .config/fish/config.fish Or, if your fish is older than 2.1 (See fish#310) . .config/fish/config.fish Then it will be sourced again, so depending on what you have in there it will be reloaded. For example appending to a universal variable would add more entries.

Categories : Shell

Does a Trigger.io reload delete all locally saved files?
I've not been able to recreate any saveURL problems with Reload - what I did: create a new app use file.saveURL and prefs module to download a file and remember its location (https://gist.github.com/goodgravy/6539470) run the app - image is shown in app make a small change to the app (e.g. some text in index.html) push out Reload update switch away from app, wait for Reload to be downloaded, switch back to app index.html change has been made, and image is still shown from original saved location I tried that out on Android 4.2 and iOS 7. Could you try that stripped-down app I linked to to see if you're seeing the same thing? If it is still a problem, please let us know what device and OS version you're on there.

Categories : Misc

How to automatically reload messages.properties files in Java/Spring?
Figured it out. It worked after I edited webmvc-config.xml: <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basename"> <value>${content.path.config}/WEB-INF/messages</value> </property> <property name="defaultEncoding" value="UTF-8" /> <property name="cacheSeconds" value="2"/> </bean> (I just needed to add the cacheSeconds property.)

Categories : Java

GNAT GPS Debugger - Could not initialize the debugger
At first it sorta sounds like a path problem, but if you're able to run a debugger tutorial that's probably not the case. The behavior you're seeing if the program isn't compiled with the debug (-g) flag doesn't quite match my experience, but let's go ahead and check/set the debug flag anyway. Select Project/Edit Project_Properties Click the Switches tab. Click the Gnatmake tab. Check "Debug information". Note that a -g now shows up in the text box at the bottom of the tab page. Click OK on the dialog. Recompile your code so that it uses the changed option. Select Build/Clean/Clean All, and OK any dialog that pops up. Then do your build (you can just press F4).

Categories : Debugging

Reload div with only javascript without jquery
Pure JavaScript (not JQuery) solution : wrap your div in an iframe, give it an id myFrame, then refresh it from the child like this: parent.document.getElementById("myFrame").reload();

Categories : Javascript

Javascript Ajax Reload Div
Yours submit listener should return false, to prevent the browser submit the form normally $('#com').submit(function(e) { e.preventDefault(); $.ajax({ type: "POST", url: "comandos.php", data: $(this).serialize(), success: function() { $('#terminal').load('terminal.php'); } }); return false; });

Categories : Javascript

Reload a javascript using jquery
i don't know what can be done with php...but things you can do are: Save In local storage (the progress) Put reloading part in iframe so parent doesn't load again Wrap Js meter part into function and call it at the top/onload event, so when page reloads it gets called too. Use eval to call javascript that is in string form

Categories : Javascript

Javascript /Jquery Reload
The cache shouldn't have anything to do w/ the slider, but to answer your question, use location.reload(true). Documentation here: http://www.w3schools.com/jsref/met_loc_reload.asp The true argument forces the page to reload from server.

Categories : Javascript

Spring Roo 1.2.4 @RooWebJson doesn't generate .aj files if backing jsonObject doesn't have @RooJpaActiveRecord
After looking a bit more into the actual json methods that are generated on a controller for a domain class annotated with @RooJpaActiveRecord, I noticed that they are all geared towards CRUD operations (ie affect the database). This means that from Roo's point of view, it wont make sense to generate controller json methods for entities that are not domain classes (stored in db), as it wouldn't know what business methods you are looking for. This means I would need to create my own manually in my controller, as only I know what it is I want to do.

Categories : Spring

How to manually reload Google Map with JavaScript
Yes, you can 'refresh' a Google Map like this: google.maps.event.trigger(map, 'resize'); This basically sends a signal to your map to redraw it. Hope that helps!

Categories : Javascript

Javascript reload, but keep post variables
In the onclick handler for the button you could create a form programmatically, fill it with hidden inputs that reflect the names and values of your variables and finally submit that form.

Categories : Javascript

Rails javascript only works after reload
I guess this is a turbolinks issue. Either remove turbolinks from your project or modify your script to something like: $(function() { initPage(); }); $(window).bind('page:change', function() { initPage(); }); function initPage() { // Page ready code... } As mentioned here.

Categories : Javascript

Simple javascript reload not working
Your refresh method is not in the global scope - it's enclosed within your document.ready. Move it out from document.ready into it's own script tag. <script> function refresh() { location.reload(); } </script> The edited bin

Categories : Javascript

Reload without losing filters / asp-javascript
call that delete.asp by Ajax. so the original page is not reloaded. example (with jquery): Function deleteEntry(code){ $.post("delete.asp", { "code": code }, function(data) { //todo: //remove the deleted data from the page per JavaScript... } }

Categories : Javascript

How to reload previous page with javascript?
You can't use window.history to achieve your desired behaviour because this is not how it works. window.history preserves the session history of the pages visited (as stated here - it essentially mimics your browsers back/forward buttons. As stated in the document: There is no way to clear the session history or to disable the back/forward navigation from unprivileged code. The closest available solution is the location.replace() method, which replaces the current item of the session history with the provided URL. So your best bet to make this work would be to use location.replace(). You can get the previous URL of where you came from using document.referrer. location.replace(document.referrer);

Categories : Javascript

How to reload a php function on javascript action?
what i have understood is that you should make ajax request, below is jquery code, for that you will have to add jquery file. $("button").click(function(){ $.ajax({url:"path_to_your_php_file_where_you_will_get_values_from_database_file.php",success:function(result){ $("#div1").html(result); }}); });

Categories : PHP

JavaScript: save and reload a range
Some similar answers: http://stackoverflow.com/a/10386105/96100 http://stackoverflow.com/a/3607788/96100 Also (self-promotion alert) you could try Rangy's highlighter module.

Categories : Javascript

How to reload javascript for jinja template?
I am not familiar with jinja, but there is a trick like below, if you want to reload js file (if I understand you right). Let's make all tags with id's, so: <script src="be/happy.js" id ="be/happy.js"></script> <script src="be/very/happy.js" id ="be/very/happy.js"></script> and so on. Now is the clue. We can force browser to load file again, using this method: var s = document.getElementById('be/happy.js'); //get access to node d.parentNode.removeChild(s); //remove it from document delete d; //destroy element d = document.createElement('script'); //create new script tag d.src = d.id = 'be/happy.js'; //add the same value to id and src attribute document.getElementsByTagName('head')[0].appendChild(d); //append child again, what force browser to script reload

Categories : Javascript

possible to refresh (not reload) a parent page with javascript?
If you want to show the newly uploaded image, then the best way is to have a function on parent page like: top.refreshImage = function(url){ $("#<ID_OF_IMAGE_TAG>").attr("src",url); //Or if you are not using jQuery then usual way document.getElementById("<ID_OF_IMAGE_TAG>").src=url; } Then from dialog, after the image is uploaded call this function: top.refreshImage("<URL_OF_NEWLY_UPLOADED_IMAGE");

Categories : Javascript

Reload an iframe without flickering/flash (in Javascript)
Easiest approach: Create a new iframe outside of DOM or in a hidden element. Load the page inside the hidden frame Once the load even fires within the hidden frame, just swap them around! Swapping To actually swap them, just have them next to each other and toggle the display: none / block css of each one.

Categories : Javascript

Javascript delete cookie before reload or redirect
I discovered if I perform an AJAX call for anything, it qualifies as a refresh for the purposed of deleting cookies. var fakeAjax = new XMLHttpRequest(); var anything = fakeAjax.responseText; fakeAjax.open("GET","ajax_info.txt",false); // file doesn't actually exist fakeAjax.send(); Note the "false" in the Open line. Asynchronous has to be set to false (or some other delay) to allow time for the new info to come back and the cookie to be deleted. UPDATE: IE doesn't like requesting responseText from a file that doesn't exist so just remove that line completely. Other browsers seem to be fine with or without it.

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.