Visual Studio node.js "breakpoint set but not yet bound"

2021-11-12T18:30:19.833+00:00

I'm facing a strange problem. If I create a NodejsConsoleApp project in any directory except the default vs directory for projects, breakpoints become inactive. When I hover on a breakpoint I see the message "breakpoint set but not yet bound". I don't face this problem if I create new project in a default dir, in that case everything works fine. I tried rebuilding project, removing bin/obj folders, updating VS, nothing helps.

Verbose log says this:

[18:04:01.962 UTC] SourceMaps.setBP: c:\workspace\app.js can't be resolved to a loaded script. It may just not be loaded yet.
[18:04:01.962 UTC] Paths.setBP: Resolved c:\workspace\app.js to c:\workspace\app.js
[18:04:01.964 UTC] → To target: "{\"id\":11,\"method\":\"Debugger.setBreakpointByUrl\",\"params\":{\"urlRegex\":\"[cC]:\\\\\\\\[uU][sS][eE][rR][sS]\\\\\\\\[dD][eE][nN][iI][sS]\\\\\\\\[wW][oO][rR][kK][sS][pP][aA][cC][eE]\\\\\\\\[cC][oO][dD][eE][gG][eE][nN]\\\\\\\\[nN][oO][dD][eE]_[sS][eE][rR][vV][eE][rR]\\\\\\\\[nN][oO][dD][eE][sS][eE][rR][vV][eE][rR]\\\\.[jJ][sS]|[fF][iI][lL][eE]:\\\\/\\\\/\\\\/[cC]:\\\\/[uU][sS][eE][rR][sS]\\\\/[dD][eE][nN][iI][sS]\\\\/[wW][oO][rR][kK][sS][pP][aA][cC][eE]\\\\/[cC][oO][dD][eE][gG][eE][nN]\\\\/[nN][oO][dD][eE]_[sS][eE][rR][vV][eE][rR]\\\\/[nN][oO][dD][eE][sS][eE][rR][vV][eE][rR]\\\\.[jJ][sS]\",\"lineNumber\":102,\"columnNumber\":0}}"
[18:04:01.964 UTC] → To target: "{\"id\":12,\"method\":\"Debugger.setBreakpointByUrl\",\"params\":{\"urlRegex\":\"[cC]:\\\\\\\\[uU][sS][eE][rR][sS]\\\\\\\\[dD][eE][nN][iI][sS]\\\\\\\\[wW][oO][rR][kK][sS][pP][aA][cC][eE]\\\\\\\\[cC][oO][dD][eE][gG][eE][nN]\\\\\\\\[nN][oO][dD][eE]_[sS][eE][rR][vV][eE][rR]\\\\\\\\[nN][oO][dD][eE][sS][eE][rR][vV][eE][rR]\\\\.[jJ][sS]|[fF][iI][lL][eE]:\\\\/\\\\/\\\\/[cC]:\\\\/[uU][sS][eE][rR][sS]\\\\/[dD][eE][nN][iI][sS]\\\\/[wW][oO][rR][kK][sS][pP][aA][cC][eE]\\\\/[cC][oO][dD][eE][gG][eE][nN]\\\\/[nN][oO][dD][eE]_[sS][eE][rR][vV][eE][rR]\\\\/[nN][oO][dD][eE][sS][eE][rR][vV][eE][rR]\\\\.[jJ][sS]\",\"lineNumber\":95,\"columnNumber\":0}}"
[18:04:01.966 UTC] ← From target: {"id":11,"result":{"breakpointId":"2:102:0:[cC]:\\\\[uU][sS][eE][rR][sS]\\\\[dD][eE][nN][iI][sS]\\\\[wW][oO][rR][kK][sS][pP][aA][cC][eE]\\\\[cC][oO][dD][eE][gG][eE][nN]\\\\[nN][oO][dD][eE]_[sS][eE][rR][vV][eE][rR]\\\\[nN][oO][dD][eE][sS][eE][rR][vV][eE][rR]\\.[jJ][sS]|[fF][iI][lL][eE]:\\/\\/\\/[cC]:\\/[uU][sS][eE][rR][sS]\\/[dD][eE][nN][iI][sS]\\/[wW][oO][rR][kK][sS][pP][aA][cC][eE]\\/[cC][oO][dD][eE][gG][eE][nN]\\/[nN][oO][dD][eE]_[sS][eE][rR][vV][eE][rR]\\/[nN][oO][dD][eE][sS][eE][rR][vV][eE][rR]\\.[jJ][sS]","locations":[]}}
[18:04:01.966 UTC] ← From target: {"id":12,"result":{"breakpointId":"2:95:0:[cC]:\\\\[uU][sS][eE][rR][sS]\\\\[dD][eE][nN][iI][sS]\\\\[wW][oO][rR][kK][sS][pP][aA][cC][eE]\\\\[cC][oO][dD][eE][gG][eE][nN]\\\\[nN][oO][dD][eE]_[sS][eE][rR][vV][eE][rR]\\\\[nN][oO][dD][eE][sS][eE][rR][vV][eE][rR]\\.[jJ][sS]|[fF][iI][lL][eE]:\\/\\/\\/[cC]:\\/[uU][sS][eE][rR][sS]\\/[dD][eE][nN][iI][sS]\\/[wW][oO][rR][kK][sS][pP][aA][cC][eE]\\/[cC][oO][dD][eE][gG][eE][nN]\\/[nN][oO][dD][eE]_[sS][eE][rR][vV][eE][rR]\\/[nN][oO][dD][eE][sS][eE][rR][vV][eE][rR]\\.[jJ][sS]","locations":[]}}
[18:04:01.967 UTC] To client: {"seq":0,"type":"response","request_seq":4,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"id":1000,"verified":false,"message":"Breakpoint set but not yet bound"},{"id":1001,"verified":false,"message":"Breakpoint set but not yet bound"}]}}
[18:04:01.967 UTC] To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/setBreakpoints","data":{"Versions.DebugAdapterCore":"6.8.9","Versions.DebugAdapter":"1.42.5","Versions.Target.Version":"v17.1.0","successful":"true","timeTakenInMilliseconds":"7.8296","requestType":"request"}}}

Could someone please tell me how can I fix this?

Developer technologies | Visual Studio | Debugging
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.