4A) Run 'yarn dev' in console then through VS Code run 'Attach to Backend', put a breakpoint in 'hello.ts' and observe it either does not bind or dissapears.
5A) Visit localhost:3000/api/hello and observe breakpoint hits in a seperate TS file that looks like a transpiled version of the source
4B) Run 'Next.JS Debug Full Stack' from VSCode, put a breakpint in 'hello.ts' and observe it either does not bind or dissapears
5B) Visit localhost:3000/api/hello and observe no breakpoint is hit
Have attached project with repro case as well if you want an install'n'go example:
nextapp.zip
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
What version of Next.js are you using?
12.0.3
What version of Node.js are you using?
14.17.3
What browser are you using?
Chrome
What operating system are you using?
Windows 11
How are you deploying your application?
Vercel
Describe the Bug
Using the NextJS full stack config taken from the documentation:
Breakpoints for /api/ functions are no longer binding in VSCode.
Have also tried the following attach config wich was working in Next 11
The console indicates the debugger did attach:
However breakpoints still fail to bind - with 'Attach Backend' there is no visible breakpoint either.
It appears when using 'Attach Backend' they are binding to a TS file which is somehow transpiled from the source TS file,
Source TS file for above looks like this:
Expected Behavior
Breakpoints should bind on the line numbers they're set on in VSCode
To Reproduce
1) Create a Next12 JS app with typescript (yarn create next-app --typescript)
2) Use the following package.json:
and yarn install
3) Use the following launch config (in .vscode/launch.json):
4A) Run 'yarn dev' in console then through VS Code run 'Attach to Backend', put a breakpoint in 'hello.ts' and observe it either does not bind or dissapears.
5A) Visit localhost:3000/api/hello and observe breakpoint hits in a seperate TS file that looks like a transpiled version of the source
4B) Run 'Next.JS Debug Full Stack' from VSCode, put a breakpint in 'hello.ts' and observe it either does not bind or dissapears
5B) Visit localhost:3000/api/hello and observe no breakpoint is hit
Have attached project with repro case as well if you want an install'n'go example: nextapp.zip