Open
Description
Describe the bug
Windows 11 / Powershell 7.4.6
/ VSCode 1.95.3
/ Netlify CLI 17.38.0
The breakpoint is not triggered.
Generally speaking, a few versions ago, Netlify CLI worked without any problem, but I think it was more than one year ago last time I debugged a function.
I read the manual (RTFM), I read a few old issues, I read a few posts in the forum, I tried different setups, but the result didn't change: the breakpoint is not triggered.
Weird workaround
Set the breakpoint to the generated or bundled function
.netlify/functions-serve/hello/netlify/hello.mjs
instead of
netlify/functions/hello.js
With the workaround eventually the debugger stops to the breakpoint.
Any hint?
Steps to reproduce
- VSCode / load a Netlify project
- VSCode / open
JavaScript Debug Terminal
- Terminal / start Netlify CLI
ntl dev
(Netlify CLI installed globally) - Terminal /
Debugger attached.
displayed - Netlify / project started
- Netlify / open browser to localhost:8888
- VSCode / add a breakpoint to the function hello
netlify/functions/hello.js
- Browser / navigate to hello function
http://localhost:8888/.netlify/functions/hello
Configuration
netlify.toml
: none
hello.js
export default async () => {
return new Response("Hello World");
};
Environment
System:
OS: Windows 11 10.0.26100
CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
Memory: 7.48 GB / 15.84 GB
Binaries:
Node: 22.12.0 - C:\Program Files\nodejs\node.EXE
npm: 10.9.1 - C:\Program Files\nodejs\npm.CMD