feat: introduce debug mode
This MR adds the extension setting gitlab.debug
. When set to true, the extension resolves stack traces using source maps and it will show debug logs.
The motivation for this MR was this comment: #580 (comment 956134944) I knew that Vim extension enables source map support and I was asking @lhsilveira.ilia
to install Vim extension so I see a proper stack trace instead of at methodName (gitlab-vscode-extension/out/extension.js:26681:9)
Without debug mode:
[error]: error
Error: error
at removeAccount (/Users/tomas/workspace/gitlab-vscode-extension/out/extension.js:26681:9)
at /Users/tomas/workspace/gitlab-vscode-extension/out/extension.js:29958:11
at o._executeContributedCommand (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:62411)
at o.$executeContributedCommand (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:63115)
With debug mode:
[error]: error
Error: error
at removeAccount (/Users/tomas/workspace/gitlab-vscode-extension/src/token_input.ts:43:9)
at /Users/tomas/workspace/gitlab-vscode-extension/src/extension.ts:69:13
at o._executeContributedCommand (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:62411)
at o.$executeContributedCommand (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:63115)
[debug]: Using non-expired account {"instanceUrl":"https://gitlab.com","id":"https://gitlab.com|xxx","type":"oauth","username":"viktomas","scopes":["api","read_user"],"token":"xxx","refreshToken":"xxx","expiresAtTimestampInSeconds":1653994614}
Edited by Tomas Vik