Visual Studio Code Debug Problem


Hello I’ve just started developing applications with NativeScript and have not debugged JavaScript in the visual studio code environment before. I put a breakpoint on the application like in the picture, but it stops in ts_helpers.js file. Why does not Breakpoin stop where I put it. Can you help?


Hey, @mertaltun, NativeScript’s debugging experience is made to imitate that of Node.js apps - there is a --debug-brk / --inspector-brk flag that will stop as soon as the first script is parsed and begins to be executed. This gives the user enough time to setup breakpoints in desired places in their code, while also making sure the runtime (the javascript virtual machine executing all your code) does not skip the breakpoints in cases it initialized quicker than the debug agent could attach and talk to the runtime.

tl;dr - The debugger, when passed a --debug-brk flag will stop on the first script. Feel free to continue the program execution, and your breakpoint will eventually be hit (if execution passes through your code, of course)

Feel free to read through the docs articles about debugging:


Thank you so much for making this work