Comments (6)
Can you try adding the following setting to your package.json "aws.samcli.enableCodeLenses": true
and then re-running the launch config
from aws-toolkit-vscode.
As it turns out, as a last resort if we can't find the codeRoot we fall back to discovering the project root:
- https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/shared/sam/debugger/typescriptSamDebug.ts#L62
- https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/shared/sam/debugger/typescriptSamDebug.ts#L43
findParentProjectFile
expects globals.codeLensRegistry to be defined and globals.codeLensRegistry only gets defined when this is true in the settings:"aws.samcli.enableCodeLenses": true
The reason why it goes through that codepath is because originally codeRoot isn't defined because there isn't a CodeUri in the template: https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/lambda/local/debugConfiguration.ts#L134
from aws-toolkit-vscode.
Hey there, first of all thanks for the help.
I have added the setting above to my package.json
file. I then run sam build
and tried to start a debug session and are getting the same error.
{
"name": "delete-test-01",
"description": "delete-test-01-description",
"aws.samcli.enableCodeLenses": true,
"version": "0.0.1",
"private": true,
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.188.0",
"@aws-sdk/lib-dynamodb": "^3.188.0"
},
"devDependencies": {
"aws-sdk-client-mock": "^2.0.0",
"jest": "^29.2.1"
},
"scripts": {
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js"
},
"jest": {
"testMatch": [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[jt]s?(x)",
"**/__tests__/**/*.mjs?(x)",
"**/?(*.)+(spec|test).mjs?(x)"
],
"moduleFileExtensions": [
"mjs",
"js"
]
}
}
from aws-toolkit-vscode.
Ah!
"aws.samcli.enableCodeLenses": true
should actually be in your VSCode settings.json file
from aws-toolkit-vscode.
Hey @jpinkney-aws ,
That does the trick.
from aws-toolkit-vscode.
Thank you!
from aws-toolkit-vscode.
Related Issues (20)
- Amazon Q: unable to sign out, "start URL already exists" HOT 8
- Amazon Q code completion HOT 1
- Translate a piece of code into another code language HOT 3
- Upgrade to vscode-l10n HOT 1
- AWS Toolkit render state machine visual rendering wrong state machine despite showing in the list HOT 5
- Unable to use Amazon Q! HOT 5
- Unable to login to amazon q developer using vs code HOT 6
- Crashes in the background, often. Usually right after locking the editor. HOT 6
- Sign in to get started doesn't work on Code Editor in SM Studio HOT 1
- Automatically generate commit messages
- Sign in to AWS Toolkit in Visual Studio Code with AWS IAM Identity Center - Start URL not accepted HOT 2
- CLI does not work in codespaces/devcontainers HOT 1
- Issue when using the "Open Dev Environment" command in the CODECATALYST pane
- Jupyter Notebook
- AWS Toolkit VS Code Plugin does not connect to S3 bucket
- @workspace attempts to index python virtual envs (.venv, venv) HOT 1
- Expose a synchronous API to Amazon Q allowing introspecting current session state. HOT 1
- Amazon Q response glitch
- Quick link to update Q extension to the latest if is outdated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-toolkit-vscode.