extjs - How to debug sencha application -
i new using sencha. have simple application , want add debug js library see errors , warning. problem when add js app see blank screen , errors in library. index.html like:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>account manager</title> <script src="http://cdn.sencha.com/ext/gpl/4.2.0/examples/shared/include-ext.js"></script> <script src="http://cdn.sencha.com/ext/gpl/4.2.0/examples/shared/options-toolbar.js"></script> <script src="../../api-debug.js"></script> <script src="app.js"></script> <script src="ext-all-debug.js"></script> </head> <body></body> </html> when remove ext-all-debug.js works.
so doing wrong ?
you have added extjs twice. don't need add js file examples. need add ext-all-debug.js , css file. mine looks this:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>account manager</title> <link rel="stylesheet" type="text/css" href="resources/css/ext-all-debug.css"/> <script src="ext-all-debug.js"></script> <script src="app.js"></script> </head> <body></body> </html> you might want have @ sencha cmd can create setup you:
sencha -sdk /path/to/sdk generate app
more info here: http://docs.sencha.com/extjs/4.2.0/#!/guide/command
to use dynamic loading of classes add code:
ext.loader.setconfig({ enabled : true, paths : { ext : "ext/src" //path ext //add custom/yourown namespaces here , paths } }); and replace ext-all-debug.js ext.js or ext-dev.js
<script src="../common/js/ext/ext-dev.js" type="text/javascript"></script> use require in code let loader know classes use:
ext.require("ext.form.panel);
Comments
Post a Comment