If I have any syntax error in jsrender its hard to debug. Is there any way to debug.
I use {{*debugger;}} and $.views.settings.allowCode=true;
and
$.views.settings.debugMode(true);
But none of them are working.
There is a new documentation topic which has been added to www.jsviews.com, here:
Error handling and debugging
which should answer your questions...
Related
EJS documentation at ejs.co says "It's easy to debug EJS errors: your errors are plain JavaScript exceptions, with template line-numbers included.".
However, when debugging the code with an bug in the template, I only get references to the functions inside my cza.js module that calls the ejs.renderFile and references to the "internal" errors within the EJS (ejs.js) itself. Reference to the bug within the .ejs template (ideally the line-number) is missing, in fact the template goes unmentioned.
So, the screenshot is of an the error within ejs.js, where EJS itself got stuck processing the bugged template, NOT the template itself, and so worthless:
So, how do I get the debugger to point out the bug in my template?
So, I have just found out that EJS does print out the code to terminal, unless a debugger does not step in to handle the exception before EJS can point out the bug.
In my scenario, I debug the app using node --inspect app.js, with debug auto-attach in VS Code enabled. The debugger then describes the exception as shown in the question screenshot.
How I found out the debugger was blocking EJS's output to terminal? I had a browser already requesting the app, when I launched it and the exception occured within the second before the debugger was attached.
I get SOAP_EMPTY using gsoap, I have searched for a long time and had no answer,SOAP_EMPTY is newly added to gsoap,and it seems I'm the unlucky guy to meet this problem.
Here is where my code come from:https://github.com/miibotree/ONVIF/blob/master/main.c
Now soap_call___tds__GetCapabilities will return code SOAP_EMPTY,I'm now using gdb to track this problem it seems that I need to set a valid soap->id to avoid this problem,but I'm a fresh guy with onvif and don't know how to set a valid soap->id,and now I'm reading various docs about onvif and trying to solve it.
Hope any guys could help me, sinch searching so many docs makes my eyes pain and I still haven't found the answer,thanks.
SOAP_EMPTY is a validation failure. This error indicates than an element/attribute is empty but is supposed to have content. For example an integer value should not be an empty string. The old error generated by older gSOAP releases in this case was SOAP_TYPE which was less informative. In either case, validation fails. The best way to find out is to use soap_print_fault() and soap_print_fault_location()` where the latter call shows the location in XML where the problem is. Our ONVIF testing with gSOAP did not reveal such an issue.
I using ZendFW 1.7.2 in my project and need to save PDF file. i am success for use function drawText but some of my data is too long so i need it break line. Now i get a solution from
http://devzone.zend.com/1776/creating-pdf-documents-with-zend-framework/
that use function drawTextBlock but when i test with it.It's can't success any always return errors
Fatal error: Call to undefined method Zend_Pdf_Page::drawTextBlock()
I think it's relate problem with something configuration ?Anyone used to success on it? please share it to me, I am looking to see your reply soon.
Thanks
DrawTextBlock is not existing in Zend Framework as it is a proposal for a improvement by Nico Edtinger. See: http://framework.zend.com/wiki/display/ZFPROP/Zend_Pdf+text+drawing+improvements+-+Nico+Edtinger
The solution provided on Zend Framework PDF multiline problems probably will help you further.
I need to find where the application is running into an unhandled exception. I am supporting this from a previous developer. The application is running and the users aren't interacting with it at the time it crashes. I have ran it in debug mode and it doesn't crash. I know the project in the solution where it happens, but that code is like almost 10,000 lines. Any help would be appreciated.
Add subscription to the AppDomain.UnhandledException event as early as you can:
AppDomain.CurrentDomain.UnhandledException += YourHandler
Inside you can log the exception information and anlyze it later
You aren't giving much to go on. You might want to look up AppDomain.UnhandledException
System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
There isnt much info given in the post above. I found following article alot more better:
http://www.switchonthecode.com/tutorials/csharp-tutorial-dealing-with-unhandled-exceptions
I wanted to display some error messages in the console of Cruisecontrol using Nant. Please let me know whether any other way is there rather than the task .
Thanks & Regards,
Priya.R
use this Link:
Cruise Control Documentation
You can specify an log Entry for occuring errors an "merge" the content of that file to build log.
Hope that solves the problem
Edit:
In addition i would recommend you reading this:
Blog Entry with Example