Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug build for Maria #17

Closed
petermichaux opened this issue Mar 31, 2013 · 5 comments
Closed

debug build for Maria #17

petermichaux opened this issue Mar 31, 2013 · 5 comments
Labels
Milestone

Comments

@petermichaux
Copy link
Owner

Could more development debugging statements be inserted in the Maria code to help developers? This code would be included in a built maria-debug.js but removed from maria.js and maria-min.js.

For example

/* DEBUG BEGIN */
    console.warn('are you sure you are doing the right thing here?');
/* DEBUG END */

Or embedded in another line

x=1; /* DEBUG BEGIN */console.info('hello');/* DEBUG END */ y=2;

The build process in the Makefile will need to strip these debugging statements.

@Raynos
Copy link

Raynos commented Mar 31, 2013

I like something like debug. I have had great success with opt in debug information by setting flags in localStorage.

@petermichaux
Copy link
Owner Author

If a View template is parsed and has more than one top level element in the DOM fragment, then console.warn as that is likely an error.

@petermichaux
Copy link
Owner Author

If a view is automatically instantiating a controller yet the controller file has not even been loaded then make a more specific error saying that particular controller constructor function cannot be found and include the expected controller name in the error message.

@petermichaux
Copy link
Owner Author

If a view cannot locate a template (e.g. the template file is not loaded or the template is misnamed) then the error message is cryptic. Something about str is null when calling trim.

@petermichaux
Copy link
Owner Author

The debugging builds are created and the messages mentioned in this ticket are implemented. The plan is to add more debugging messages over time as new message possibilities are discovered but everything in this ticket is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants