w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
What is difference in debugging in debug mode and release mode with disabled optimization?
There's very little magic to it. Debug and Release are simply names assigned to a set of compiler options. The most relevant option for the Debug configuration is the /Od option, it disables the optimizer so your code is easier to debug. Clearly you can always change the Release configuration options to resemble the Debug configuration options. Like disabling the optimizer. Now there's no relevant difference anymore between them and the Release configuration behaves a lot like the Debug configuration in the debugger. Other options normally used in the Debug configuration that affects your code: the _DEBUG macro is defined, asserts will fire function inlining is turned off the /RTC option is turned on, very good at catching bugs in your code the _HAS_ITERATOR_DEBUGGING macro is defi

Categories : Visual Studio

Qt Application shows build error in Debug mode, OK in release mode
When you installed qt, did you configure it to install static debug libraries also. If not then try reconfiguring and reinstalling it. In windows, I think you installed from a preconfigured, precompiled binary that may not have static debug support. Try downloading the source and then configure and compile it according to your needs

Categories : Qt

Release mode Vs DEbug mode in MS Visual Studio Windows
when the shared library/dll is built in Release mode and my application is also built in Debug mode Result: Application is getting crashed without loading any symbols from call stack. That's because this is not a supported configuration. By default, the Debug and Release targets link to different versions of the CRT, which (among other things) use different strategies for allocating memory and are not compatible with one another. This is just an extension of the more general rule that you aren't supposed to mix libraries that link to different versions of the CRT. All of the projects need to match. And as you've already seen, when they do, everything works correctly. There are workarounds for this, but they're a lot of work to get right. Essentially, you make sure that all memory al

Categories : C++

Android App working well with DEBUG mode, but not with RUN mode
I follow this steps and now it's working Plugged phone Start RUN mode Open DDMS perspective Select my application from Devices panel, under my device's name Open DEBUG perspective Now it's outputting errors. Fixed my errors and now it's working but i've no idea why i wasn't working only debug mode and not working with run mode. My problem solved with this steps. Thank you.

Categories : Android

Something works in debug mode but not in normal mode
WebSphere Application Server uses different XML engines for normal mode and debug mode, and it sounds like you've found a variance between them. You should double-check that your code is following the javadoc (i.e., you're not doing something with undefined behavior), and if that's not the case, considering opening a PMR with IBM to fix the problem in normal or debug mode (it could be that debug mode should also be failing...). Alternatively, consider moving up to a newer version; 6.1 is quite old, and your problem might be fixed in a later version of the product.

Categories : Java

Devise loses session after deploy
You should never wipe out a database during deployment. Imagine that your app is running and you have hundreds of users. Now you make some changes in the code and do a deploy. POOF all your data and users are gone! Certainly this is not what you want. Secondly, users getting logged out when you wipe out the database could be due one of the following reasons: Are you seeding users with the same ID? If the user ID changes when you re-seed, it will cause users to be logged out Are you storing sessions in the database using config.session_store :active_record_store instead of using cookies? In this case, wiping out the database will delete the sessions table and log out all users Rails 4 uses an encrypted cookie store by default. Make you sure you're not changing your application's config.s

Categories : Ruby On Rails

Search Bar Loses FirstResponder when rotated from Portrait to Landscape mode
inside the method that deals with roation of the view - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; check to see what interface you are in - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) { [searchBar becomeFirstResponder]; } } hope that helps!

Categories : IOS

Java Hibernate Session in View Merge loses Changes?
you should take a look at locking algorithm. There are 2 popular ones: optimistic and pessimistic. For web application optimistic locking usually works better. Long story short each revision of entity object is given a version label (often a bigint or string db column). When someone pre-empt your update and your version became stale, hibernate will throw optimistic lock exception, in which case you can capture and ask the user what to do (or take other appropriate measure)

Categories : Java

Meteor loses login session on page change (heroku only)
Turns out this was a meteor/chrome bug and will be fixed in version 0.6.5. https://github.com/meteor/meteor/issues/1244 https://groups.google.com/d/msg/meteor-talk/Pct1_kFlp4I/3a2lXlyF6zcJ

Categories : Javascript

check session registered in php, than jquery ajax to print session variables
you can just create a php script that gets the session variable you need and echo it if its not empty (your logic). then you want to use that jquery script to update the div: function loadLog(){ $.ajax({ url: "getsession.php", cache: false, success: function(html){ $(".message").html(html); }});}

Categories : PHP

Rails, session and rendering partial with session variables via AJAX, have to work but not working (SOLVED)
try creating a template named like remember_me.js.erb in appropriate controller's views folder and paste this code in it. $(".session").html("<%= j render partial: 'static_pages/debag' %>");

Categories : Ruby On Rails

ios objects are released in Debug mode but not being released in Release mode
From what I understood, ARC auto-releases object with different timing weither you're building in debug or release mode. This is due to the optimization flag of the compiler being -O0 in debug and -O3 or -Os in release. I recall hearing an Apple engineer talking about it in one of the WWDC '13 talks (I'll try to find the session name), and from what I remember, this behaviour will be improved in the futures Xcode builds to make ARC in debug mode behave much more like it does in release mode. I know it does not help much, but I'm not familiar enough with ARC implementation to offer more details. See also How do you debug an issue with a release mode build in iOS? to help debug your code in release mode.

Categories : Iphone

Session variables don't get passed to the third page after session start
I don't know what is in your objects.php, calling session should probably come before that. session_start(); require("objects.php"); echo session_id(); echo $_SESSION["loggedin"];

Categories : Misc

prestashop (php / SESSION variables ) how to store variables from a form and use them in if / else commands
In prestashop 1.5, global are deprecated. To set something in the cookie : In a controller : $this->context->cookie->__set($key,$value); Other file : $context = Context::getContext(); $context->cookie->__set($key,$value); You can access to your value with : In a controller $this->context->cookie->key Other file : $context = Context::getContext(); $context->cookie->key; Prestashop doesn't use the $_SESSSION, so you can't access to $smarty.session.key You have to assign your variable to smarty In a controller : $this->context->smarty->assign(array('key' => $this->context->cookie->key)); Other file : $context = Context::getContext(); $context->smarty->assign(array('key' => $context->cookie->key));

Categories : PHP

mysql prepare: session variables vs parameters & local variables
Okay, well thanks for those that looked. I found the answers when related questions showed up after posting. Sometimes we (or at least I) don't always know how to search for what we want. At any rate, here are the two answers: 1) Prepared statements are session global. See Dynamic MySQL with local variables and http://dev.mysql.com/doc/refman/5.1/en/sql-syntax-prepared-statements.html (look for "A prepared statement is also global to the session."). Although I am not 100% clear on this, the result is that requires session variables. The answer was by Justin Grant. 2) "Parameter markers can be used only where data values should appear, not for SQL keywords, identifiers, and so forth." from http://dev.mysql.com/doc/refman/5.7/en/prepare.html, which was answered here mysql stored procedure

Categories : Mysql

Restarting program in debug mode
Your isDebug right-hand-side seems to be sufficiently tricky to not be sure whether it should work or not. Why don't you just set it to true and test whether the debugger starts. Afterwards you known whether it's the isDebug evaluation or the debugger restart.

Categories : Java

Can ipa file be created in debug mode?
About the first question, yes, you can archive an app in Debug mode. From Xcode, browse the Product menu, Scheme, Manage Schemes, Edit. Select the Archive action on the left pane and choose Debug as Build Configuration in the drop down box. If you want to restrict logging only to Debug configurations, you can add this to your ProjectName-Prefix.pch file: #ifdef DEBUG #define XYZLog(format, ...) NSLog(format, ## __VA_ARGS__) #else #define XYZLog(format, ...) #endif Where "XYZ" is the three letter prefix for your application (Cocoa naming convention). Then you must use XYZLog instead of NSLog in your code and the output will only go to the console for Debug versions.

Categories : Xcode

SFML Only Works in Debug Mode
Short answer: You can't mix debug / release binaries. Quoting the official SFML tutorial for Visual Studio: It is important to link to the libraries that match the configuration: "sfml-xxx-d.lib" for Debug, and "sfml-xxx.lib" for Release. A bad mix may result in crashes. It's in red here.

Categories : C++

Toggling debug mode programmatically
If permissions on your IIS server are set to allow changes to web.config from your site's code you can relatively easy do so. You can use XML API to change Web.config. Notes: it is bad idea to allow site's code to modify it configuration/binaries. Make sure you understand security implication of that your site will restart on any change to web.config, for normal sites (stateless, all date is in some sort of external storage/DB) it is somewhat ok, but if you have something like in-memory session state it could be painful. Even stateless servers may require significant time to start - be careful. You should consider other approaches (i.e. simply logging and reading logs server side) before starting to play with configuration of servers if they actually see real user traffic and especial

Categories : C#

Not able to start hybris in debug mode
which version of hybris are you using? How do you currently start hybris? Is hybris and eclipse on the same machine? do you have admin privileges? i am using hybris 3.1 with eclipse-helios. First i start hybris without eclipse in debugmode: using ...platform omcat-6indebug.bat at commandline. After that i start debugging by attaching the eclipse-debugger to that debugmode-running hybris instance using a eclipse debug configuration "remote java application" with connection Properties: host=localhost, port=8000.

Categories : Java

Turn off Joomla debug mode
EDIT: Since I see you turned on error reporting, you will need to edit the variable $error_reporting within the JConfig class in the configuration.php file to: public $error_reporting = 'default';.

Categories : PHP

Cannot find a JSP variable in debug mode
NetBeans debugger doesn't see JSP vars as variables that can be evaluated directly. They are context attributes. So, the method that worked for met was to enter pageContext.findAttribute("perspectiveCount") in the "Evaluate Code" tab. After doing so and clicking on "Evaluate Code Fragment" button debugger added pageContext.findAttribute("perspectiveCount") to the "Variables" tab and showed its value there.

Categories : Java

Xcode - Looking at logs in debug mode? (iOS)
Use the Xcode Organizer window. Select the Devices tab. Then choose the connected device and select Console under the device. You will see more than just your app's logs messages but they will be there.

Categories : IOS

Loading uncompressed js file in debug mode
Indeed, if the script URL begins with http, the code that is responsible for including the uncompressed version (i.e, remove the min. segment if such exists or add -uncompressed otherwise) is ignored. The source for this behavior: JHtml::includeRelativeFiles() in libraries/cms/html/html.php:298 protected static function includeRelativeFiles($folder, $file, $relative, $detect_browser, $detect_debug) { // If http is present in filename if (strpos($file, 'http') === 0) { $includes = array($file); } else //process the script sourch. } ... } Most of the script files, including frameworks, are included as relative paths. I guess that this behavior is meant to prevent remote resources from getting 404ed.

Categories : File

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

OPENCV cannot open my image in debug mode
The debug version of your opencv library was probably compiled without support for "jpg" images. Also, see this answer Make sure you did not mix up release and debug lib's of OpenCV when you linked libraries. Debug libraries have d at the end. Also, make sure that you are using the correct lib name based on the opencv version that you have, for example opencv_calib3d245d.lib

Categories : C++

Windows Form Won't Display in Debug Mode
Most likely a exception is happening during the initialization, Go in to the Debug->Exceptions dropdown menu and be sure the checkbox thrown for Common Language Runtime Exceptions is checked, this will let your code break on the exception that is happening. If you are still not catching the exception go to Debug->Option and Settings then uncheck the box for Enable Just My Code and check the box for Break when exceptions cross AppDomain or managed/native boundries This may give you some "read herring" exceptions, as some .NET processes use exceptions for control of flow logic. So just be aware that the first exception you see may not be the cause of your problem.

Categories : C#

ASP.NET MVC bundling - include script only in debug mode
I actually came up with an answer to this whilst writing out the question. Since I hadn't been able to find an answer through searching I decided to post the question anyway and answer it - both so it is available as reference for anyone else wanting to do the same thing, and to get feedback from wiser minds than mine if this the most performant way of achieving this - or even a sensible thing to do. var jQueryBundle = new ScriptBundle("~/js/main").Include( "~/Scripts/jquery-1.{version}.js", "~/Scripts/script.js"); if (HttpContext.Current.IsDebuggingEnabled) { jQueryBundle.Include("~/Scripts/jquery-migrate-{version}.js"); } bundles.Add(jQueryBundle); I have tested this and whilst debugging the script is listed (I have retained the defaults of bundling and minification left

Categories : Asp Net

How to apply bundle transform in debug mode?
Put this in the Application_Start method in your Global.asax file. BundleTable.EnableOptimizations = true; I haven't worked with only applying certain transforms but taking a look at this post: ASP.Net MVC Bundles and Minification You should be able to do this. You might need to refactor your bundle code a little so that you can add Conditional Compilation Variables to clear your transforms in debug only. So it could look something like this: var noMinify = new ScriptBundle("~/bundles/toNotMinify").Include( "~/Scripts/xxxxxx.js" ); #if DEBUG noMinify.Transforms.Clear(); noMinify.Transforms.Add(new ConfigFileTransform()) #endif _bundles.Add(noMinify);

Categories : Asp Net Mvc

Qt 4.8.4 giving error in debug mode compilation
That's because the libraries are named differently in the debug version. You shouldn't use LIBS for Qt libraries. You should be telling qmake to figure out the link options by doing: CONFIG += qaxcontainer This is documented here: http://qt-project.org/doc/qt-4.8/activeqt-container.html

Categories : Qt

GWT 2.5.1 and IntelliJ debug mode, serializable exception
Do you set an output directory in your maven GWT plugin? Sometimes, GWT will output everything under the source directory, and it won't be clean by "mvn clean". Look for .rpc or .cache.html files to figure out where maven puts the output and remove anything you did not write yourself.

Categories : Java

Is it possible to create TODOs or Comments while in Debug mode
If you just need to flag a line and don't need to add text, you can use the bookmark feature in Visual Studio: http://msdn.microsoft.com/en-us/library/vstudio/2wffxsy0.aspx This lets you flag multiple lines and then quickly navigate between them.

Categories : Visual Studio 2012

How to start tomcat using maven in debug mode
we can cheat. use java opts in *IX export JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044" then run your maven, it should go to debug mode

Categories : Maven

fopen in c does not work without running in debug mode
Using sizeof() to determin the needed space for pfname is wrong I guess. I should have the declarations of path and fname to be sure but either they are pointers, then you would get the pointer size (4 or 8) or they are arrays, then you would get the complete array size. Use malloc(strlen(path)+strlen(fname)+1) instead.

Categories : C

Why is DbContext.SaveChanges 10x slower in debug mode
There are multiple performance considerations for EF and it's known that, compared to many others orm's, operations can be slower than expected/desired for an orm. (1st) when running on debug will always be slower and (2nd) first run after building will always be slower. All of this may depend on the complexity of your model. Try to capture the T-SQL statements using SQL Profiler.

Categories : Asp Net

static_folder not functioning in Flask debug mode and in development
Using absolute path seems to work in my case. import os PROJECT_PATH = os.path.dirname(os.path.realpath(__file__)) app = Flask(__name__, template_folder=os.path.join(PROJECT_PATH, 'www/templates'), static_folder=os.path.join(PROJECT_PATH, 'www/static') )

Categories : Python

Logback defaulting to debug mode for some third party libraries
This seemed to be a problem because the application used EJB's. The application server (glassfish) loaded the EJB's before the logging context was actually set. Hence the log messages for some of the libraries got logged under DEBUG level. Using a wrapper class around the logger resolved the issue. The wrapper class delayed the logger creation until its first use. public class LogWrapper { private Class loggerClass; private Logger logger; public LogWrapper(Class loggerClass) { this.loggerClass = loggerClass; //lazy logging context creation (to avoid issues with static instances in EJBs which get loaded on startup before logging ctx name is actually set) } /** * For lazy init of logger, on first actual use, so the logger context will be correctly set ev

Categories : Java

using the release version of boost libs in debug mode
Short answer: You don't. Boost uses parts of the C++ runtime which work differently in Debug and Release so stuff is likely to break eventually. However, if you absolutely want to shoot yourself in the foot: You can prevent automatic linking by setting the BOOST_ALL_NO_LIB preprocessor flag and then manually link to the release binary instead.

Categories : C++

Is there a cross platform way to detect debug mode compilation?
For many or most compilers, "debug" mode is a multifaceted concept that includes several orthogonal settings. For example, with gcc, you can add debugging symbols to the output code using -g, enable optimizations using -O, or disable assert() macros using -DNDEBUG (to define the NDEBUG macro). In my work, we have deployed production code with many combinations of these enabled or disabled. We have left -g on in order to attach to running processes and troubleshoot them using gdb (in which case we usually have to fight with the spaghetti -O produced), left assertions on to get more information about persistent errors across releases, and disabled optimizations for legacy codebases written under a more permissive interpretation of "undefined behavior" (until we could fix/replace it). Sin

Categories : C++

Android debug mode not working waiting for device
For HTC try downloading HTC sync and give a try.. I also had this problem and i used eclipse IDE. I Re connected and try 2-3 times and after that i run adb devices I got it as online. Also check out for the devices TAB in eclipse(if you are using that) .It also gives a list of attached devices. Also try adding this android:debuggable="true" to application tag(<application>) in androidmanifest.xml Hope it helps :)

Categories : Android



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