You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
> [ERROR]: SAM debug: no workspace folder
Analysis:
If vscode workspace file exists (example: `.vscode/Untitled.code-workspace`) then:
- vscode adds configs to it instead of `.vscode/launch.json`.
- `folder` is undefined when VSCode invokes `resolveDebugConfiguration()`.
- Workspace folders are available via `vscode.workspace.workspaceFolders[x]`.
Solution:
- If `folder` is undefined and `vscode.workspace.workspaceFolders.length === 1`,
then use `vscode.workspace.workspaceFolders[0]`.
- If `vscode.workspace.workspaceFolders.length > 1`, VSCode appears to
choose one, and thus `folder` is _not_ undefined when
`resolveDebugConfiguration()` is invoked.
0 commit comments