• The case of the disappearing 'Debug' CodeLens in Visual Studio Code

    Or how to debug any Jest unit test in Visual Studio Code

    I’m trying to debug a TypeScript unit test which uses the Jest library. There’s a nice VS Code extension vs-jest that integrates with Jest and even adds CodeLens labels so you can click to debug a specific test. Except the debug label kept disappearing! It would show when I first loaded the folder in Code, but after the tests all ran then the label would go away. Even though the test is passing, I wanted to debug it so I could step through the code. What’s going on?

    Screenshot showing 'Debug' going away

    There’s some troubleshooting tips listed on the vscode-jest README. This gave me the hint that there are some config settings that can alter how the extension behaves. When I viewed my current settings.json, I saw this:

        "typescript.tsdk": "node_modules\\typescript\\lib",
        "eslint.packageManager": "yarn",
        "eslint.validate": [
            {"language": "typescript", "autoFix": true }
        "jest.debugCodeLens.showWhenTestStateIn": [

    That last setting caught my attention. Clicking inside that array and code completion offered two other values “pass” and “skip”.

        "jest.debugCodeLens.showWhenTestStateIn": [

    Adding those and hitting save, and then the ‘debug’ labels returned and stayed for all the tests!

  • Replacing my Dell XPS 9550 laptop's battery

    I’ve had my XPS 9550 since April 2016, so it’s almost 4.5 years old now. It’s still going pretty well but the battery has been getting a bit tired. I’d sit down on the sofa planning to do a bit of Chocolatey package moderation and it would be flat in under an hour (that’s just Firefox running). Any heavier tasks would chew up the power even quicker.

    Whilst I’d love a new laptop, I think there’s another year (or more) left in this one, so I began the journey of locating a replacement battery.

    Richard wrote about his experiences replacing a battery in the same model a few years ago. Unfortunately the supplier he used no longer exists.

    If you Google ‘Dell XPS 9550 replacement battery’, you’ll learn a few things:

    1. Dell (for some strange reason) don’t actually sell replacement batteries for that model.
    2. There’s a bunch listed on Amazon.com, but while the search results say they’re available in Australia, for every one when you click on it, it says “This item cannot be shipped to your selected delivery location. Please choose a different delivery location”.
    3. There’s none listed on Amazon.com.au

    That left trying 3rd party websites, and one possibility that came up in the list was https://www.laptopbatterydirect.com.au/.

    They have both the 56W and 84W batteries listed for Dell XPS 15 9550.

    Photo of 84W laptop battery with two screwdrivers

    I knew I’d also need a T5 Torx screwdriver to undo the laptop case. Intriguingly one of the photos included two screwdrivers. I emailed the company and confirmed that they do actually include the screwdrivers (and indeed they were in the box when it arrived).

    The battery only took a few days to be delivered. Apparently they have a warehouse in Australia so it didn’t need to come from overseas. That was a bonus.

    Dell publish a full service manual for the XPS 15 (which includes replacing the battery).

    Removing the bottom of the laptop was straight forward removing all the Torx screws.

    Laptop with base removed

    Remove all the screws around the old battery and then drop the new one in. It was a tight fit, particularly around the connector. A bit of gentle persuasion got it seated correctly.

    Laptop battery connector

    I’d seen a few reviews (mostly on Amazon) about folks who’d tried installing 3rd party batteries and either the laptop refused to work with them, or they didn’t hold charge correctly, so I was a little nervous to see how it all went.

    Battery report

    Windows can generate a HTML battery report for you via powercfg /batteryreport. The history only lasts from the last time you reinstalled Windows. I’ve done that a number of times since I first got this laptop so unfortunately it’s not the entire history of each battery I’ve had.

    The most recent entries for the old battery indicated it had degraded to the point of having a remaining capacity of only 25,992 mWh (at 100% charge). Pleasingly the new battery reports 81,442 mWh.

    Battery life estimates went from 53 minutes up to almost 6.5 hours.

    So I think this is looking like a good update. Time will tell how well this battery lasts.

  • Lights, camera, action!

    A number of times now I’ve given a remote presentation in the evening and I’ve struggled with lighting. The room I use just has ceiling lights and my desk faces a window. A pleasant view in the day but very dark at night. I ended up borrowing my daughter’s desk lamp to help make me look a bit brighter. That’s not a long term solution (especially if my daughter wants to use her desk light too!)

    I’ve noticed some people getting Elgato Key Lights, and they certainly look pretty swish, not to mention how they’re remotely controllable, but at $AU270 per light (or $AU199 for the ‘Air’), they’re not that cheap. Elgato make some nice gear, but unless I was using it all the time I don’t think my budget could justify it.

    More recently I saw the ‘Neewer’ brand getting mentioned on Twitter and at $AU55 for two lights, I was interested!

    Neewer Lights

    I ordered a Neewer 2 Packs Portable Photography Lighting Kit Dimmable 5600K USB 66 LED Video Light with Mini Adjustable Tripod Stand and Color Filters for Table Top/Low Angle Photo Video Studio Shooting amazon.com.au amazon.com.

    You get two lights which are USB powered, with a controller on each power lead to turn on/off and dim up/down. They come with a small stand that uses standard 1/4” screw connectors.

    Smallrig clamp mount

    The comments on this product point out that the stand is not that tall, but I realised that I should be able to mount the stands on my existing monitor arms. All I’d need was something to attach to the arms. A couple of SMALLRIG Super Clamp Mount with Ball Head Mount Hot Shoe Adapter and Cool Clamp amazon.com.au amazon.com should do the job!

    I was pleasantly surprised that it only took a few days for the packages to arrive. I presume they must have stock in Australia instead of having to ship from overseas.

    I assembled the lights and removed the tripod foot so I could instead use the clamps. Here’s the clamp attached to the monitor arm:

    Camp on monitor arm

    And here’s one of the assembled lights:

    Light on stand behind monitor

    Now I’m all set for my next evening presentation!

    Disclosure: As an Amazon Associate I earn from qualifying purchases