Debug Typescript with VS Code Jasmine-TS Extension

At work, we develop a lot of AWS Lambda code and occasionally I see a junior developer deploy a Lambda EACH time they test, and they test manually in the Lambda UI!

This is extremely inefficient. You should run your code locally and here is a short video describing the process

Caveats

  • If you develop on Windows, there may be some edge cases where the code executes fine locally but has issues in the Lambda (Linux) runtime.
    • This is usually caused by line endings, forward vs back slashes, and exec/spawn commands.
    • Solution: Use Windows Subsystem for Linux for Lambda development

Update 2023-06-29

I switched to ts-jest and the Jest Runner VS Code extension. It does the same thing as the above example but is a little simpler to set up.

Share