Debugging – the process of finding and fixing defects in software – can be a challenging task to do in all languages. Node.js is no exception. Luckily, the tooling for finding these issues improved a lot in the past period. Let’s take a look at what options you have to find and fix bugs in…
I am at the level with Node.JS that I no longer “Suck at it” but I am still learning every time I use it. One of the areas I struggled with was debugging, which was much different and difficult than my .NET and PHP days. It seems like open source meant that you were on your own for debugging.
Special thanks to Gergely for his article on just the topic of Node.js debugging.
One of the takeaways in the article is Pino is an extremely fast Node.js logger, inspired by bunyan. In many cases, pino is over 6x faster than alternatives like bunyan or winston
I had tried Winston as it was recommended by one of my programmer gods. I was not worthy because I couldn’t understand it. I have high hopes for Pino.
via How to Debug Node.js with the Best Tools Available — RisingStack Engineering
Sometimes when using ASCIIDoctor to do some documentation it would be nice to split the heading across multiple lines. If you type one continuous line of text you take your chances where the splitting will occur. Using a special sequence can help you control the splitting.
The example above shows three distinct lines in the header
- State of Micigan (Misspelled)
- Departmental Work Intake Process (DWIP)
- Design Document.
The ASCIIDoctor header code for the heading is
= State of Micigan Departmental Work Intake Process (DWIP) Design Documentation
This will result in ASCIIDoctor determining where the split will happen.
By using the special control sequence, shown below, you can add breaks where you want them
This control sequence allows a “pass”through of an HTML sequence ”
” to ASCIIDoctor
To get the format shown in the example change the header line to
= State of Micigan pass:q[<br>]Departmental Work Intake Process (DWIP) pass:q[<br>]Design Documentation
PDF View of multiple line header
Still not formatted exactly how I want it but if I move the “Line Break” control sequences around I can it just right.
HTML View of multiple line header
If you’re used to Microsoft Word then you are used to Markup authoring. You type some content, then you switch you view to format the content, and back and forth. Make your life easier by losing the Microsoft Word addition. If your focus is the content over form then maybe consider using ASCIIDoctor. It is a “Markdown” tool, less is more. Create large amounts of content easily, quickly and with a standard righteous look.
This is truly a minimumilist approach to creating and maintaining content that can be shared across the web, turned into a book, slide presentation, turned into a Word document (Why??) or heaven forbid, printed.
Http iframes are not shown in https pages in many major browsers. Please read this post for details.