Skip to content

Instantly share code, notes, and snippets.

View dchowitz's full-sized avatar
🏠
Working from home

Denny Christochowitz dchowitz

🏠
Working from home
View GitHub Profile
@dchowitz
dchowitz / es6-debugging-in-vscode.md
Last active August 30, 2023 06:23
Debugging ES6 in VS Code

Debugging ES6 in VS Code

My current editor of choice for all things related to Javascript and Node is VS Code, which I highly recommend. The other day I needed to hunt down a bug in one of my tests written in ES6, which at time of writing is not fully supported in Node. Shortly after, I found myself down the rabbit hole of debugging in VS Code and realized this isn't as straightforward as I thought initially. This short post summarizes the steps I took to make debugging ES6 in VS Code frictionless.

What doesn't work

My first approach was a launch configuration in launch.json mimicking tape -r babel-register ./path/to/testfile.js with babel configured to create inline sourcemaps in my package.json. The debugging started but breakpoints and stepping through the code in VS Code were a complete mess. Apparently, ad-hoc transpilation via babel-require-hook and inline sourcemaps do not work in VS Code. The same result for attaching (instead of launch) to `babel-node

@dchowitz
dchowitz / !css-only-rating-input.md
Last active July 2, 2017 06:35
CSS-only rating input

Rating Input Elaboration

Fiddling around with getting a rating input consisting of checkboxes rendered as stars to work with CSS only.

A Pen by Denny Christochowitz on CodePen.

License.

@dchowitz
dchowitz / enableDebug.js
Last active February 7, 2019 10:36
Enable/configure debug output in React Native
export default function(namespaces) {
if (!window.localStorage) {
window.localStorage = {
removeItem: function() {}
};
}
window.localStorage.debug = namespaces;
}