From my terminal I run firebase emulators:start --only functions,firestore --inspect-functions
.
I currently have this launch.json
:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Typescript Functions",
"port": 9229,
"restart": true,
"skipFiles": ["<node_internals>/**"],
"outFiles": ["${workspaceFolder}/typescript-functions/lib/*.js.map"]
}
]
}
My intention is to debug a server side endpoint, calling it through POSTMAN. I've been digging different documentation and guides, but I haven't had the ability to exactly find demos or guides regarding the necessary Typescript mapping.
The launch.json is inside the .vscode
folder, at the root level. Then I have my typescript-functions
folder, where inside of it I have a src
folder with all the Typescript code.
Then, there is a lib
folder where all the transpiled code exists in javascript, with their respective source maps.
What am I missing?
I've been reading different questions:
Functions debugging in VS Code
https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_source-maps
https://code.visualstudio.com/docs/nodejs/nodejs-debugging
https://code.visualstudio.com/docs/typescript/typescript-debugging#_mapping-the-output-location
https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_source-maps
VS Code Unbound breakpoints: We couldn't find a corresponding source location
But unfortunately, haven't had the ability to find out the solution yet. I have verified, that if my code was written in JS, the debugger works as expected and stops the execution correctly, so my conclusion is that i'm basically missing the part where i'm linking the typescript source mapping, and where does the debugger need to look at.
Thanks :)