azure-functions-core-tools
azure-functions-core-tools copied to clipboard
Use ts-node for Typescript Projects
It would be really nice to use ts-node
under the hood for typescript projects when developing. Debugging errors would be far easier seeing where the error happened in the TS code vs compiled JS.
@mhoeger could you please take a look at this?
Hi @grbspltt - we're not very likely to fix this, it's quite a bit of work for a very specific scenario for us (especially because we would not want to run with ts-node in production for perf reasons).
One thing we are working on is fixing this, so that file changes can be made while debugging: https://github.com/Azure/azure-functions-host/issues/3543. Hopefully any errors are going to be easier to see and debug with a debugger attached. Please let us know if this wouldn't meet your need and we can consider it for the future, although please note that we are unlikely to implement this specific ask.
@mhoeger Thanks for the response. I would expect that using ts-node would be for development purposes only. I don't know anything about what happens under the hood when func start
is run but perhaps a command like func start-dev
could use ts-node and the source files instead of dist.
What I'm really looking for is a simpler way to read error messages. I see the source maps in dist, but they aren't used when errors come up.
Would love to see support for this as well!
BUMP! Let's keep this one in the spotlight
This would be a great feature to have!
This would speed up the development process a lot!
This is something I have been expecting to see for a long time now! Its very inconvenient to stop/start the debug session everytime we make a change.
Would be great if this was included in the tools.
As a temporary solution, I'm running tsc -w
in another bash tab.
What is the guidance for debugging TypeScript projects? EDIT: Had to manually adjust ports for inspection as mentioned here https://stackoverflow.com/a/55932453/18146992