Print Debugging Snippets

Hey guys, thought it’d be fun to share some different takes on Print Debugging :slight_smile:

http://docs.activestate.com/komodo/11/manual/printdebugging.html

You can create your own snippets for Print Debugging so it becomes useful in different ways, you might even be able to come up with a use-case for it that’s totally different altogether.

So I thought it’d be interesting to see what everyone does with Print Debugging. Please share your customised snippets, if you have any.

Here’s mine, I’ve customised it so that it just increments by 1 each time you place a print statement:

// komodo tool: JavaScript Print Statement
// =======================================
// auto_abbreviation: false
// indent_relative: false
// is_clean: true
// language: JavaScript
// set_selection: true
// treat_as_ejs: true
// type: snippet
// version: 1.1.5
// =======================================
console.log(!@#_currentPos<% window._c = window._c !== undefined ? window._c+1 : 0 %><%= window._c %>!@#_anchor);

I’ve got one that allows me to print a variable of my code and some nice formatting to know where I am.

console.log("[[%f]] @ [[%L]] [[%tabstop1:TXT]]: "+[[%tabstop1]]);

%f = Filename.
%L = Line number
%tabstop1=multicursor tabstop

I’ve been using that snippet for almost a year. I love it. Now it’s my Print Debugging tool.