Describe the bug
Unable to debug runtime action from vscode because of invalid '.vscode/launch.json'.
On creating an extension of type "Experience Cloud Shell Extension Point" using aio-cli (steps here)and launching the debugger from vscode (steps here), vscode is throwing the following error -
Error: ENOENT: no such file or directory, stat '/Users/sagera/work/azureservicebus-events-connector/Users/sagera/work/azureservicebus-events-connector/src/dx-excshell-1/actions/message-queue-connector/index.js'
at Object.statSync (fs.js:1127:3)
at Object.statSync (/Users/sagera/work/azureservicebus-events-connector/node_modules/graceful-fs/polyfills.js:312:16)
at mountAction (/Users/sagera/work/azureservicebus-events-connector/node_modules/@openwhisk/wskdebug/src/kinds/nodejs/nodejs.js:59:16)
at resolveValue (/Users/sagera/work/azureservicebus-events-connector/node_modules/@openwhisk/wskdebug/src/invoker.js:45:16)
at OpenWhiskInvoker.prepare (/Users/sagera/work/azureservicebus-events-connector/node_modules/@openwhisk/wskdebug/src/invoker.js:179:38)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Debugger.start (/Users/sagera/work/azureservicebus-events-connector/node_modules/@openwhisk/wskdebug/src/debugger.js:116:13)
at async wskdebug (/Users/sagera/work/azureservicebus-events-connector/node_modules/@openwhisk/wskdebug/index.js:302:13) {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/Users/sagera/work/azureservicebus-events-connector/Users/sagera/work/azureservicebus-events-connector/src/dx-excshell-1/actions/message-queue-connector/index.js'
This error is because of an issue in the generated '.vscode/launch.json' file. The error goes away when I make the following change in the "runtimeArgs" under "configuration":
Expected behavior
We should not get any error and the debugger should get seamlessly attached to the action.
Screenshots
If applicable, add screenshots to help explain your problem.
Error logs -
Error dialog -
Logs from the error dialog -
Error processing launch: Error: Could not connect to debug target at http://127.0.0.1:53058: Could not find any debuggable target
at Object.retryGetNodeEndpoint (/private/var/folders/4w/bzr57xk93mq24rm9cz4bhcsr0000gn/T/AppTranslocation/B66ECF55-4919-45EA-A1F8-D0A9F170A431/d/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js:2:1299140)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async t (/private/var/folders/4w/bzr57xk93mq24rm9cz4bhcsr0000gn/T/AppTranslocation/B66ECF55-4919-45EA-A1F8-D0A9F170A431/d/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js:2:1333468)
at async P.launch (/private/var/folders/4w/bzr57xk93mq24rm9cz4bhcsr0000gn/T/AppTranslocation/B66ECF55-4919-45EA-A1F8-D0A9F170A431/d/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js:2:1338155)
at async t.Binder.captureLaunch (/private/var/folders/4w/bzr57xk93mq24rm9cz4bhcsr0000gn/T/AppTranslocation/B66ECF55-4919-45EA-A1F8-D0A9F170A431/d/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js:2:1131345)
at async t.Binder._launch (/private/var/folders/4w/bzr57xk93mq24rm9cz4bhcsr0000gn/T/AppTranslocation/B66ECF55-4919-45EA-A1F8-D0A9F170A431/d/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js:2:1130890)
at async Promise.all (index 3)
at async t.Binder._boot (/private/var/folders/4w/bzr57xk93mq24rm9cz4bhcsr0000gn/T/AppTranslocation/B66ECF55-4919-45EA-A1F8-D0A9F170A431/d/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js:2:1129942)
at async t.default._onMessage (/private/var/folders/4w/bzr57xk93mq24rm9cz4bhcsr0000gn/T/AppTranslocation/B66ECF55-4919-45EA-A1F8-D0A9F170A431/d/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js:2:1222072)
Desktop (please complete the following information):
OS: [e.g. iOS] - macOS Big Sur 11.2
Browser [e.g. chrome, safari] chrome v92
Version [e.g. 22]
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
Add any other context about the problem here.
Describe the bug Unable to debug runtime action from vscode because of invalid '.vscode/launch.json'.
On creating an extension of type "Experience Cloud Shell Extension Point" using aio-cli (steps here)and launching the debugger from vscode (steps here), vscode is throwing the following error -
This error is because of an issue in the generated '.vscode/launch.json' file. The error goes away when I make the following change in the "runtimeArgs" under "configuration":
Generated launch.json (which has the issue)
Fixed launch.json (The issue is fixed when "${workspaceFolder}" prefix is removed from the runtimeArgs.) See -
To Reproduce Steps to reproduce the behavior:
Expected behavior We should not get any error and the debugger should get seamlessly attached to the action.
Screenshots If applicable, add screenshots to help explain your problem. Error logs -
Error dialog -
Logs from the error dialog -
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.