what is the fastest and easiest way to debug typescript in node ?( c/c++ programmer here )
umen last edited by
im new to the server and new to typescript i was searching the web for standard way to setup devenv using this server as test to debug and each tutorial show in consist way to setup development /debugging environment
can you please elaborate and share what is the easiest way to debug the server ?
please im not looking for just do: prinf(..) answers ...
Hey @umen, welcome to the forum! <3
The easiest way to debug Node.js applications is by using the
--inspectflag via command-line, check the official guide: https://nodejs.org/en/docs/guides/debugging-getting-started/
You can debug the app on Chrome via
When using TypeScript, you may want to use this command: (you'd need to have
ts-nodeinstalled as a dependency or devDependency)
node --inspect -r ts-node/register YourServer.ts
You can also debug directly through VS Code: https://code.visualstudio.com/docs/nodejs/nodejs-debugging
Cheers! Good luck with your project!
umen last edited by umen
Thanks for your quick answer ,
everything runs fine!