I am working with Magento but i didn't find a very good way to debug my modules. For example, many time, i got a blank page with no php error and no apache error. For example, in backend, if one grid controller isn't well set, i don't have an error.
How to debug Magento module?
It sounds like you want to enable Developer mode. Add this to your .htaccess file:
SetEnv MAGE_IS_DEVELOPER_MODE "true"
You may also want to enable display errors in index.php:
ini_set('display_errors', 1);
The best way I have found to debug is with X-Debug in a local environment. You can also use log files to help debug in a production environment, if your unable to run X-Debug in the environment.
I've got a more detailed posting here:
https://gist.github.com/molotovbliss/2792c6c59410d75e5baf249b76413247
Consider also installing XDebug
This thread is old but useful.
Debugging tools and tricks are important as it saves lots of time of a developer.
Here is a compiled list My company Uses.
Use of Eclipse debugger: Magento is installed on a desktop using Eclipse debugger we apply breakpoints and other debugging tricks.
Use of Bug commerce as suggested in above post.
Use of Mage::log for error log and exception log.Also Magento Report files.
Use of Varien Object getData, debug.
Use of back trace: Mage::log(Varien_Debug::backtrace(true, true), null, 'backtrace.log')
Remote server level debugging.
var_dump PHP function to echo and exit.
If you are (want to be) a real Magento Developer, here is the best combination of IDE and plugin you must use to work on your Magento Projects.
First of all, phpStorm the best IDE you can find.
Exist a very helpful plugin called magicento that you can use auto-complete, find in path magento, create modules very quickly and without issue, other great stuff you can use with that plugin.
Of course need to install Xdebug (be carefully if you already run a project with ioncube, bc you need to make some trick there, Xdebug doens't work properly with ioncube loader).
This last item on the list is something I need to be reviewing but I think should be great to debugging porpoises, MagentoDebugger Chrome App.
Let me know if you need something else or any help installing some of the stuff.
Best,
Alejandro.
You can look in var/log/exception.log or system.log in the magento root. These are the directories for Magento excepetions and logs. Otherwise you might need to increase the php error log level.
Alan Storm created a Commerce Bug to help with some inline development issues.
Please try to use this magento debugger, it's chrome extension. http://w3site.org/magento_debugger it's realy speeds up a work. Just need to configure on the backend once and use Chrome extension.
Here easy to debug blocks, mails. Easy profile your extensions, etc.
Related
I'm trying to upgrade Magento from 1.3.2.4 to 1.8 but finally browser reset the connection so I even cannot see what is the reason of the problem. How can I debug installation process, so I will be able to see what modules were installed/upgraded, to what version, what module is installing currently now, etc. I think that the best way is some kind of install log that is written to file. May be someone has some scripts or can suggest me classes/method where I can put log file write points?
I am experimenting with Joomla 3.1.4. Whenever I add a new module the template does not show at all in the front-end. The site is blank. On disabling the new module it starts showing properly again. Even a basic hello world type of module does not seem to work and nor does a third party extension I have tried.
I can see them in the extension manager and in the module manager and they have installed successfully. Frustrated with all this I decided to install a new 3.1 template which too installed successfully. However this template does not show anything in the front-end either with my module enabled. It almost seems that there is some sort of security restriction which is disabling the template from rendering whenever any change is made to the basic installation.
Can someone please give pointers to resolving this odd behaviour?
Probably one or some of the core files required for the modules to work are missing.
Head to Global configuration and make sure your Error reporting is set to development. Reload the page and update your question with the error message.
Why not try the newer Joomla 3.1.5 (Download page)? I know that 3.1.4 had at least one problem which could possibly cause server errors in conjunction with extensions (the most likely reason for the blank page that you see).
In general, when encountering a blank page, the first thing to do should be to check the error log of your webserver!
Do Magneto CE extensions work in PE? The extensions I've tried installing in PE aren't working (they install but yield blank screens) and I can't find a straight answer; don't know if it's a problem on my end or if it's built in to Magento. Thanks in advance!!
Short answer is yes. CE modules can function correctly as part of PE, but it will depend greatly on what parts of the functionality it touches.
Things to do for any Magento issues like this:
Ensure the extension is enabled (check to ensure it's output is enabled and it's active) - see this post for reference (the post is how to turn off an extension, but it will point you in the right direction)
Refresh your cache
Ensure logging is on and check your logs for errors
Check your web server logs - where these are will depend on which web server you are running. Apache logs are generally in the error.log file under /var/logs/apache2 or /var/log/httpd
If all else fails, start debugging, by putting Mage::log() entries into the code and seeing what is logged and what isn't
Any extension could possibly work in any version, even if it isn't listed as such. Generally developers of extensions just list the versions that it has been tested in, but that doesn't mean it cant be used in others.
Best way to find out is install the module in your dev environment, and test to make sure it isn't overwriting/breaking any of the existing functionality.
I am trying to get started in development of my website and plugins using Umbraco. When I download the binaries from Codeplex, the installation and running of the website works fine. When I downloaded the source code, All I get is a login screen even when the web.config files are the same. Am I doing something wrong or is there something I missed.
The path I use to map IIS to is
branches\4.1.0\umbraco\presentation
You need to compile the source code to get it to work.
To be honest, you shouldn't need the full source unless you really want to start hacking around in the core (which may cause you problems with future updates) or you want to see how stuff works. The Umbraco framework is pretty extensible, I've not found too much so far that I couldn't do without having to touch the core source.
I had a similar issue when running the source and that was that the hashing of the admin password did not work. So i debugged it to see what value was expected and then changed it in the database.
I am installing the Open Source app, Laconica, for microblogging. There are instructions to install it using XAMPP. Now I prefer to do a straight Windows install. In doing so, I have run into some problems related to missing variables, improper DB variable definitions, etc. Now my colleague wants to try using XAMPP. But my question is why would XAMPP resolve my problems? How can a tool which help setting up fix these inherent variable and DB issues? Am I missing something? It seems to me that XAMPP is setting up the app to work in a particular env, whereas the problems I am solving are related to the actual PHP code that was written.
XAMPP will come with all the dependencies that you need to run Laconica in one package. It's possible that you currently have a different version of PHP or the database that Laconica is looking for.
XAMPP dosn't set up apache, PHP, etc. It is apache, PHP, ect.
Without knowing what your errors are, it would be difficult to say what problems XAMPP might resolve, as we don't know what problems you are having now.
For earlier versions of Laconica, we didn't set E_NOTICE for our dev environments -- the default is to have E_NOTICE off for Ubuntu systems. So, people using other environments may see "errors" that we didn't.
This has been corrected in later versions; I think we do pretty well with notice errors enabled now.
You can also put this line in your config.php to turn off notice reporting:
error_reporting(E_ALL ^ E_NOTICE);
You should almost definitely turn off error notifications to the browser, like so:
ini_set('display_errors', false);