aws-amplify / aws-amplify/docs

Typescript step debugging instructions for Amplify Gen 2

Open
#7,698 0 comments 0 reactions 0 assignees View on GitHub
amplify/gen2 getting-started
Dominant language
MDX
Stars
506
Forks
1.1k
Avg merge
3h 14m
Merged PRs (30d)
1

Description

**Describe the content issue**:
As TypeScript appears to be the preferred language for creating Lambda functions in AWS Amplify Gen 2, there ought to be some instructions about getting Lambda step debugging working in VSCode using the AWS Toolkit extension.

I've tried using both the quickstart template for Angular, and the manual installation methods. When you use the "Add Debug Configuration" button in VSCode, it creates a `launch.json` entry.
![image](https://github.com/aws-amplify/docs/assets/4357286/d6ede3a1-c3a4-4ed0-b282-a3dd2cc2afc0)
But whether you do this using the template, or the manual installation, it doesn't work. Using the template, it complains `NodejsNpmBuilder:NpmPack - NPM Failed: npm error Invalid package, must have name and version`.

Along with this, it would help if there was an explanation of the various tsconfig.json and package.json files in an Amplify project. It would be nice if there was something about "this one is for the front end code, this one is for the backend code". And maybe "we recommend using this bundler, or that setting because XYZ". And if you're using the AWS Toolkit, in some cases it seems to create an "aws-toolkit-tsconfig.json". We should know how this fits in as well so we can understand what settings we need to debug a project successfully, and how to make sure that our lambda deployments are optimized for size/efficiency.

**URL page where content issue is**:
https://docs.amplify.aws/angular/build-a-backend/functions/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.